Skip to content

Latest commit

 

History

78 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mobile Agent logo

Mobile Agent

A mobile-first autonomous AI agent stack built by Mattia Beltrami, Computer Engineering student at Politecnico di Milano.

GitHub repo iOS Backend AI

What It Is

Mobile Agent is a personal AI command center: an iPhone app connected to a server-side autonomous agent that can reason, keep session context, and operate through a real terminal.

The project started from a simple idea: make an AI agent feel less like a tab in a browser and more like a personal system that is always available from your phone. The iOS app is the control surface; the backend is the execution layer; the agent loop is the brain that keeps working while the client stays lightweight.

Why It Matters

Most AI apps stop at chat. Mobile Agent is designed around action.

  • Start a task from iPhone and keep the agent running on the server.
  • Give the agent access to a controlled terminal tool for real software work.
  • Preserve sessions, messages, tool events, and outputs across app restarts.
  • Use a clean native mobile interface instead of a generic web wrapper.
  • Keep the architecture small enough to understand, extend, and deploy as a personal project.

Tags

mobile-agent ios swiftui openai autonomous-agent personal-ai terminal-agent nodejs express gpt

Product Vision

Mobile Agent is a personal operating layer for AI-assisted work. It is built for students, builders, and technical founders who want an agent that can be reached from a phone but still has the execution power of a backend machine.

The long-term direction is a polished personal agent platform with richer tools, stronger guardrails, background notifications, file awareness, and a native mobile experience that makes serious agent workflows feel fast and natural.

Architecture

Layer Path Role
iOS app app-ios/ SwiftUI client with auth, server selection, chat, session persistence, long-output handling, and reset flow.
Backend backend/ Express API with OpenAI integration, JWT auth, sessioned chats, file-based persistence, and a server-side agent loop.
Agent prompt backend/system-prompt.txt Defines the agent behavior and tool-use protocol.
Data backend/data/ Local NeDB storage generated at runtime for users, sessions, and messages.

Core Features

  • Native SwiftUI dark interface for iPhone.
  • Login and signup with JWT-backed API authentication.
  • Persistent chat sessions that survive app closes.
  • Server-side agent loop using OpenAI tool calling.
  • Terminal execution tool with timeout and output truncation.
  • Event messages for command execution and agent progress.
  • Configurable model, prompt path, loop limits, and debug mode.
  • Simple deployment shape: Node backend plus native mobile client.

Quick Start

Backend

cd backend
npm install
cp .env.example .env
npm run dev

Set the required environment variables in backend/.env:

OPENAI_API_KEY=your_api_key
JWT_SECRET=change_me
PORT=3001

Optional backend settings:

OPENAI_MODEL=gpt-5.1
SYSTEM_PROMPT_PATH=backend/system-prompt.txt
AGENT_DEBUG=1
AGENT_MAX_TURNS=12

iOS App

Open the Xcode project:

open app-ios/NoesisApp/NoesisApp.xcodeproj

Then set the signing team if needed, run on iPhone or simulator, enter the backend URL on the login screen, and start a session.

API Surface

Endpoint Purpose
POST /api/signup Create a user and return JWT plus session id.
POST /api/login Authenticate and return JWT plus session id.
GET /api/messages Fetch the active chat history.
POST /api/messages Send a user message and trigger the agent loop.
POST /api/reset Create a fresh session and clear active context.

All chat endpoints require Authorization: Bearer <token>.

Built By

Mobile Agent is a personal project by Mattia Beltrami, Computer Engineering student at Politecnico di Milano.

It reflects the kind of software I want to build: practical, ambitious, mobile-native, and close to real AI workflows rather than demos that only look good in screenshots.

Roadmap

  • Push notifications for completed background tasks.
  • Safer tool sandboxing and per-command permission controls.
  • File browser and artifact viewer in the iOS app.
  • Multi-device session sync.
  • Hosted deployment template for fast personal setup.
  • Better observability for agent runs, tool calls, and failures.

Notes

This is an experimental personal agent system. The terminal tool is powerful by design, so production use should add stricter sandboxing, audit logs, rate limits, and deployment-level isolation.

About

Mobile-first autonomous AI agent with a native SwiftUI iPhone app, OpenAI-powered backend, persistent sessions, and terminal execution.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages