Your AI Agents, In Your Pocket
A native iOS AI Agent app — multiple customizable AI assistants, right on your phone
Website · Features · Quick Start · MIT License · 中文文档
Most AI chat apps are just chat boxes. Palvia is different — it's a full-blown AI Agent platform where every agent has its own soul, memory, and skills, and can execute code directly on your device.
| Typical AI Chat | Palvia | |
|---|---|---|
| Personas | Single conversation | Multiple agents, each with independent personality & memory |
| Code Execution | Not supported | Built-in JavaScript interpreters |
| Web Automation | Not supported | In-App Browser with agent-driven automation |
| Context | Long conversations lose context | Auto-compression + summary injection + session RAG — never forgets |
| Extensibility | Closed | Skill system + Cron jobs + Sub-agents |
| Privacy | Cloud-stored | All data stays on-device via SwiftData |
Palvia is a native iOS AI agent app focused on autonomy, extensibility, and privacy.
- Native iOS first — built with Swift + SwiftUI, optimized for iPhone/iPad interaction patterns
- On-device architecture — sessions, memories, and vector retrieval are persisted locally via SwiftData
- Action-oriented agents — supports code execution, browser automation, tool calling, scheduling, and sub-agents
- Highly customizable — every agent can have its own SOUL.md / MEMORY.md / USER.md and custom skills
In short: Palvia brings powerful AI agents directly to your pocket, without requiring extra server infrastructure.
- Create multiple AI agents, each with its own SOUL.md (personality), MEMORY.md (persistent knowledge), and USER.md (user profile)
- Agents can spawn sub-agents that inherit the parent's soul configuration
- Flexible Markdown config space — you define how each agent behaves
- JavaScript interpreter — executed in a WKWebView sandbox with automatic crash recovery
- Two execution modes:
repl(expression evaluation) andscript(full scripts) - Save and reuse code snippets — build your mobile code library
- Session-centric interaction design
- SwiftData persistence — your data is safe and never lost
- Auto context compression — when token limits are exceeded, older messages are compressed and summaries are injected into system prompts
Agents don't just chat — they remember. Palvia includes a built-in Retrieval-Augmented Generation (RAG) framework that turns past sessions into a searchable knowledge base, so agents can recall and reason about prior conversations.
- On-device vector embeddings — powered by Apple's NaturalLanguage framework (sentence-level with word-vector fallback), all computed locally with zero cloud dependency
- Hybrid search — vector similarity search (cosine, threshold >0.3) with automatic keyword fallback, ensuring results are always available even without embeddings
- Agent-callable tools — two function-calling tools exposed to agents:
search_sessions— semantic search across an agent's session historyrecall_session— retrieve and paginate through a specific session's messages (token-aware, max 4 000 tokens)
- Automatic context injection — related sessions are discovered at session start and injected into the system prompt, so agents have relevant history without being asked
- Background indexing — embeddings are lazily backfilled on app launch in batched, CPU-throttled passes so the UI stays smooth
- Privacy & ownership — embeddings stay on-device; each agent can only search its own sessions; the current session is auto-excluded to prevent self-reference
- Compatible with any OpenAI API-compatible endpoint
- Full SSE streaming support with real-time typewriter output
- Built-in presets: OpenAI / DeepSeek / OpenRouter / Ollama (local)
- Configure multiple providers and switch freely
- Built-in browser powered by WKWebView — browse the web without leaving the app
- Agent-driven automation: agents can navigate pages, click elements, fill forms, extract data, and execute JavaScript — all through function calling
- 9 browser tools:
browser_navigate,browser_click,browser_input,browser_extract,browser_execute_js,browser_get_page_info,browser_select,browser_wait,browser_scroll - Mutex lock ensures only one agent session controls the browser at a time; users see a live banner and can take over at any time
- Simplified DOM extraction gives agents a readable view of page structure (links, forms, buttons, text)
read_config/write_config— read and modify agent mind filesexecute_javascript— run codesave_code/load_code/list_code— manage code snippetscreate_sub_agent/message_sub_agent— sub-agent lifecycle managementschedule_cron/unschedule_cron— scheduled task managementsearch_sessions/recall_session— session RAG & cross-session retrievalbrowser_*— 9 browser automation tools (see In-App Browser section above)
- Installable skill library to give agents new capabilities
- Flexibly attach skills — one skill can serve multiple agents
- Create scheduled tasks for agents with automatic background execution
- Built on
BGTaskSchedulerfor system-level reliable scheduling - Deep Link triggers:
iclaw://cron/trigger/{jobId}
- Xcode 15+
- iOS 17.0+
- XcodeGen
# Install XcodeGen
brew install xcodegen
# Generate the Xcode project
cd Palvia
xcodegen generate
# Open in Xcode
open Palvia.xcodeproj- Open the app → Settings → Add an LLM provider (enter API endpoint, key, and model name)
- Go to Agents → Create your first agent
- Go to Sessions → Start a new session → Chat away!
Palvia/
├── project.yml # XcodeGen config
├── Palvia/
│ ├── App/ # App entry point & root navigation
│ ├── Models/ # SwiftData models
│ ├── Services/
│ │ ├── LLM/ # LLM API client, SSE parser
│ │ ├── Agent/ # Agent management
│ │ ├── Session/ # Session service, context compression
│ │ ├── Prompt/ # System prompt construction
│ │ ├── FunctionCall/ # Tool definitions & routing
│ │ ├── CodeExecution/ # Code execution engines
│ │ ├── Browser/ # In-App Browser service & automation
│ │ ├── CronJob/ # Cron job scheduling
│ │ └── Skill/ # Skill management
│ ├── ViewModels/ # Observable view models
│ ├── Views/ # SwiftUI views
│ └── Resources/ # Assets & default templates
| Layer | Technology |
|---|---|
| UI | SwiftUI + Declarative Navigation |
| State | Observation Framework (@Observable) |
| Persistence | SwiftData |
| Code Execution | WKWebView Sandbox |
| Web Automation | WKWebView + Agent-driven function calling |
| Networking | URLSession + SSE Streaming |
| Project Gen | XcodeGen |
This project is open-sourced under the MIT License.
Copyright (c) 2026 ShadowMov
Palvia — Your AI Agents, In Your Pocket.
palvia.net