Airgent is a local-first agent base system. It exposes the same runtime through:
- a CLI
- an HTTP API
- a WebUI
The runtime uses the OpenAI Agents SDK for orchestration, keeps short-term conversation history in a local SQLite-backed session store, and persists long-term memory locally.
When Airgent starts inside a project directory, that directory becomes the active workspace. Project-local skills are loaded from .agents/skills.
- Python 3.11+
uvfor environment and command management- FastAPI for API and static WebUI hosting
- Typer for CLI
- OpenAI Agents SDK for the agent runtime
- SQLite for sessions, transcripts, and memory
uv sync
export OPENAI_API_KEY=your_key
export OPENAI_BASE_URL=https://xxx.example.com/v1
uv run airgent serve --reloadThen open http://127.0.0.1:10304.
You do not need to create a virtual environment manually for normal use.
Install Airgent globally with uv:
sh scripts/install.shOr:
uv tool install --force .Then you can run:
airgent tui
airgent serveOne-shot:
uv run airgent chat "给我一个今天的工作计划"Interactive:
uv run airgent chatTUI:
airgent tuiInside the TUI:
Entersends the current prompt/opens the command palette/resumesearches and restores a previous sessionCtrl-Otoggles full execution details for thinking/tool activity
Session inspection:
airgent sessions list
airgent sessions show <session-id>Memory inspection:
airgent memory list
airgent memory search "uv python"
airgent memory add "The user prefers uv for Python envs" --tags python,toolingRun the agent:
curl -X POST http://127.0.0.1:10304/api/v1/agent/run \
-H 'Content-Type: application/json' \
-d '{
"input": "总结一下 Airgent 这个项目该怎么设计"
}'List sessions:
curl http://127.0.0.1:10304/api/v1/sessionsList memory:
curl http://127.0.0.1:10304/api/v1/memories- Local data defaults to
~/.airgent/airgent.db. - Project-local skills default to
./.agents/skills. uvis the intended workflow for dependency management and execution..envis loaded automatically. These keys are supported:
OPENAI_API_KEY=sk-...
OPENAI_BASE_URL=https://your-proxy.example.com/v1
OPENAI_API_MODE=chat_completions- Airgent now configures the Agents SDK with an explicit
AsyncOpenAIclient, so proxybase_urlsettings are applied consistently for both CLI and API. OPENAI_API_MODEdefaults tochat_completions, because proxy services are usually more compatible with that mode thanresponses.- When
OPENAI_BASE_URLis set, namespaced model IDs such asanthropic/claude-sonnet-4.5are forwarded to the proxy as-is instead of being rejected as unknown providers. - SDK tracing is disabled by default because this project persists conversations locally instead of relying on hosted tracing.
- Current root agent tools are:
read_filecreate_fileedit_filesearch_memoryremember_notelist_skillsload_skill
MIT
