Architecture¶
A grounded view of how AgentInk is built. AgentInk is instructed to state these facts accurately and never invent them.
Reasoning¶
- Model: Google Gemini (via Vertex AI), through the
google-genaiSDK. - It uses native function calling: the agent loop sends the model a system prompt + tool declarations, the model requests tool calls, the loop executes them and feeds results back, until the model produces a final answer.
- Anthropic / Claude is not the reasoning engine. (
@agentink anthropic loginis only an optional per‑user credential feature, used by the Claude Code one‑shot tool.)
Agents¶
- Parent agent (
run_agent_loop) — the main Slack‑facing agent. - Child agents (
run_child_agent_loop) — dedicated sub‑agents scoped to specific channels, each with its own system instruction, tool subset, sandbox, and logs. They can escalate to the parent.
Memory & state¶
- Neo4j — knowledge graph (tasks, people, relationships, agent activity).
- PostgreSQL with row‑level security — encrypted per‑user secrets, developer "mirror" profiles, conversation history, meeting settings, and the dashboard activity log.
Runtime & surfaces¶
- Runs as a single
inkwell.service(systemd) on one GCP VM. - Connects to Slack via Socket Mode (primarily
#agentink-live-development). - A FastAPI web server (
inkwell-web) serves the dashboard API + the telemetry WebSocket; Caddy terminates TLS and serves the static pages onifndr.com. - A scheduler (APScheduler) runs proactive/cron tasks.
Specialized subsystems¶
- Image generation — Nano Banana 2 (
gemini-3-pro-image-preview) viagenerate_content; outputs hosted underifndr.com/generated/. - Android computer‑use — a dedicated KVM‑accelerated emulator VM (
agentink-emulator) that the agent drives over a remoteadbconnection on the private network; it idle‑stops to save cost and auto‑wakes on demand. - Live meetings — a meeting bridge that joins calls via Recall.ai Output Media and converses with browser‑side Gemini Live; minutes post back to Slack.
- Claude Code one‑shot — sandboxed Docker sessions for ticket‑scoped code changes that open PRs.
- Consequence Gate — a guard that intercepts binding/physical/outbound actions and holds them for human approval.
Observability¶
- A logging bridge forwards all
inkwell.*log records to the telemetry pipeline → persisted in Postgres (agent_activity, 7‑day retention) and broadcast to the dashboard's WebSocket. So everything the agent does is loggable and viewable. See The Dashboard.
Repository & deployment¶
- Code lives in
aiinkwell/chronoson GitHub. - Changes follow the Order of Operations: branch → test → PR → review → merge → deploy → verify.