AkurAI Build
Menu

popagent

public
2c7138e7ddf8cb6b5ac0dc1abbe6d76743366c19 15 commits 2 branches 0 tags
AkurAI Build Checkpoint workspace and secret management work 2c7138e
.agents Add safe autonomous deployment and complete project guidance searxng Initial popagent baseline src Checkpoint workspace and secret management work workspace Initial popagent baseline .env.example Checkpoint workspace and secret management work 1631 .gitignore Initial popagent baseline 108 AGENTS.md Add safe autonomous deployment and complete project guidance 1036 AGENTS_AGENT.md Checkpoint workspace and secret management work 16460 AGENTS_BROWSER.md Add safe autonomous deployment and complete project guidance 3510 AGENTS_CHANNELS.md Add safe autonomous deployment and complete project guidance 4681 AGENTS_DOCUMENTATION.md Add safe autonomous deployment and complete project guidance 3379 AGENTS_HOOKS.md Initial popagent baseline 6030 AGENTS_MEMORY.md Checkpoint browser channels and memory work 4784 AGENTS_OBSERVABILITY.md Add safe autonomous deployment and complete project guidance 2247 AGENTS_RULES.md Checkpoint workspace and secret management work 6578 AGENTS_UI.md Add workspace chat bulk deletion 11258 bun.lock Add workspace documentation RAG 187600 bunfig.toml Checkpoint workspace and secret management work 95 deploy.sh Checkpoint workspace and secret management work 11621 docker-compose.yml Add workspace documentation RAG 1466 LICENSE Add safe autonomous deployment and complete project guidance 1078 package.json Add workspace documentation RAG 1101 README.md Checkpoint workspace and secret management work 3498 tsconfig.json Initial popagent baseline 670
README.md

popagent

A single-user agent workspace with a Mastra backend and assistant-ui frontend, served by Bun. Models use a local OpenAI-compatible 9Router gateway; search uses local SearXNG; durable state uses PostgreSQL.

Requirements

  • Bun
  • Docker with Compose
  • A reachable 9Router gateway
  • Linux with systemd for managed deployment

Setup

cp .env.example .env
chmod 600 .env
# Replace every placeholder and generate POPAGENT_SECRET_KEY as documented.
git clone https://akurai-build.olibuijr.com/git/popagent.git workspace/popagent
docker compose up -d --wait
bun install --frozen-lockfile
bun run dev

The application defaults to http://127.0.0.1:5180. Set POPAGENT_API_KEY before exposing it beyond a trusted machine. Runtime data, credentials, repositories, recordings, and deployment backups are ignored by Git.

Development

bun test <file>       # narrow loop
bunx tsc --noEmit
bun test              # complete suite

Storage tests require disposable PostgreSQL. Live model scenarios require 9Router; browser and search integration require their local services. Agent-specific architecture and verification rules begin in AGENTS.md.

Deployment

AkurAI Build hosts the public Git repository. Publication and deployment are deliberately separate:

./deploy.sh privacy-check
./deploy.sh publish   # privacy scan, then push committed main
./deploy.sh deploy    # full isolated suite, candidate readiness, brief service restart

On Midget, deploy verifies that the commit is published and triggers Titan over SSH. On Titan, it refuses dirty or divergent work, ensures the ignored workspace/popagent agent checkout exists, starts required services, provisions disposable test databases, runs the full suite, validates a candidate, backs up databases for SQL changes, installs a user systemd service (or a system service under sudo), monitors health, and rolls back a failed restart. Override remote details with POPAGENT_DEPLOY_HOST, POPAGENT_DEPLOY_PATH, and POPAGENT_GIT_REMOTE.

For authenticated publication, inject POPAGENT_GIT_USERNAME and POPAGENT_GIT_TOKEN only for that command. The script does not persist them. Titan's .env remains host-local and is never synchronized through Git.

Model compatibility

Popagent accepts model IDs from the live 9Router catalog. The local titan/qwen3.5-4b route uses a llama.cpp chat template that accepts only one leading system message, so Popagent combines Mastra's consecutive leading system instructions for that model only. Slow local inference can take longer than Bun's default request timeout; the server allows up to 255 seconds of stream inactivity before disconnecting.

If a local model produces no response, confirm it appears in GET /api/models, check the Popagent and 9Router logs for an upstream error, and retry with a short prompt. Other models retain their original multi-system-message request shape.

Security

  • Never commit .env, credentials, runtime data, database dumps, browser profiles, recordings, or workspace repositories.
  • Documentation and retrieved repository content are untrusted reference material.
  • Browser navigation is constrained by persisted host policy, DNS checks, and workspace isolation.
  • Application secrets are encrypted in PostgreSQL with POPAGENT_SECRET_KEY.

See .env.example and the linked AGENTS_*.md domain files for current configuration and contracts.

License

MIT