Skip to content
Proyectos

alfredfrancis/ai-chatbot-framework

Ver en GitHub

Acerca de

Un agente de IA ligero y autohospedado que puede utilizar cualquiera. Cada persona obtiene un asistente con su propio ordenador privado, archivos, habilidades, conexiones con aplicaciones y trabajos programados.

IA y aprendizaje automático

Cómo se miden estas cifras

What you can do

  • Any model. Claude by default; OpenAI, Ollama, OpenRouter, vLLM, LiteLLM or any other LangChain chat provider. Users can bring their own key.
  • A private computer per user. One Docker sandbox with a persistent /workspace, resource limits and no Linux capabilities. Commands and local MCP servers run there.
  • A small, fast agent loop. Four tools (read, write, edit, bash), parallel tool calls, background commands, context compaction, and steering: type while the agent works and it picks your message up without stopping.
  • Sub-agents. The agent splits a big job into parts and runs helpers side by side, each with a fresh context and its own model. You can watch each one work.

Crecimiento de estrellas medido

in 24h
0
in 7 days
+2
in 15 days
+2
in 1 month
+23

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

AI Chatbot Framework logo

AI Chatbot Framework

A self-hosted AI agent for everyone on your team.
Each person gets an assistant with its own private computer, files, skills, app connections and scheduled tasks.

CI MIT license

Quick start · Features · Deploy · Configuration · Architecture · Contributing

AI Chatbot Framework home screen: chats, projects, files, skills, tasks, connections and personal apps in the sidebar, and the message box in the middle

Version 2. AI Chatbot Framework used to be an intent/entity NLU chatbot builder. Version 2 rebuilds it as an agent. The old code is in the git history.

Why

Most agent tools are built for developers. This one is built for people who just want work done: they type what they need, and the agent reads their files, runs code, uses their apps and remembers how they like things. You run it on your own server, with the model of your choice, and every user's work stays in their own locked-down sandbox.

Features

  • Any model. Claude by default; OpenAI, Ollama, OpenRouter, vLLM, LiteLLM or any other LangChain chat provider. Users can bring their own key.
  • A private computer per user. One Docker sandbox with a persistent /workspace, resource limits and no Linux capabilities. Commands and local MCP servers run there.
  • A small, fast agent loop. Four tools (read, write, edit, bash), parallel tool calls, background commands, context compaction, and steering: type while the agent works and it picks your message up without stopping.
  • Sub-agents. The agent splits a big job into parts and runs helpers side by side, each with a fresh context and its own model. You can watch each one work.
  • Memory in plain files. context.md (about you) and memory.md (what the agent remembers) are files the agent reads every turn and edits itself. Every few messages a background pass updates memory and skills from the chat.
  • Skills. The open Agent Skills format (skills/<name>/SKILL.md). Upload one, let the agent write one, or type / in a chat to pick one. Eleven come built in, from pdf and cited-research to council-of-llms and personal-assistant.
  • App connections (MCP). Local servers run in the sandbox; remote servers sign in with OAuth. One-click setup for Linear, Notion, Jira, Sentry, Stripe and more.
  • Personal apps. The agent can build small apps for you, like a daily Cockpit or a grocery list, that show up in the sidebar. Each app has its own chat in a panel on its right: ask for a change there and watch the app update as the agent works. Chat replies can include charts, tabs and buttons too.
  • Projects and scheduled tasks. Group chats under shared instructions and a folder. Run a prompt "every weekday at 08:00" or once "tomorrow at 17:00"; each run becomes a chat, on the model you pick for the task (a small local one is enough for many background jobs).
  • Files and artifacts. Attach files to a message; each chat lists the files it used and made; documents the agent writes open rendered beside the chat.
  • Open protocol. The chat speaks the Agent Client Protocol over WebSocket, so editors and your own apps can talk to the agent too.
  • Built to scale. Stateless app processes behind Caddy, with PostgreSQL and Redis. Add or remove processes at any time.
  • A calm interface. Keyboard-first (⌘K, shortcuts), dark and light themes, works on a phone and installs as an app (PWA).

Every feature in detail: docs/features.md.

Screenshots

Steering while it works Skills Connections (OAuth)
Steering: a message queued while the agent works Skills page Connections page with a connected app
Files Command menu (⌘K) Phone, light theme
Files page Command menu Chat on a phone in light theme
Cockpit app Sub-agents Charts in a personal app
Cockpit personal app Sub-agents working in parallel Personal app with charts

The end-to-end tests take these screenshots on every run (docs/screenshots/e2e/).

Quick start

Try it on your machine with Docker. A scripted fake model answers, so you don't need an API key:

git clone https://github.com/alfredfrancis/ai-chatbot-framework.git
cd ai-chatbot-framework
docker compose -f docker-compose.dev.yml up --build   # or: make up-dev

Open http://localhost:5173 and create an account. Try run: ls or show system in a chat.

To use a real model:

ACF_LLM_BASE_URL= ANTHROPIC_API_KEY=sk-ant-... make up-dev
Ports, database and running without Docker

The web app is on :5173 and the API on :8000 (API only; use 5173). Both reload when you save. PostgreSQL is on host port 55432 (postgresql://acf:acf@localhost:55432/acf). If a port is taken, set ACF_DEV_WEB_PORT, ACF_DEV_API_PORT or ACF_DEV_DB_PORT. Agents run in real sandboxes.

Without Docker, make setup && make dev runs the same thing on your machine (set ACF_SANDBOX=local; it is not isolated, so use it for development only).

Deploy

On a server with Docker and a domain pointing at it:

git clone https://github.com/alfredfrancis/ai-chatbot-framework.git && cd ai-chatbot-framework
cp .env.example .env        # set ACF_DOMAIN, POSTGRES_PASSWORD, ACF_SECRET_KEY and a model key
# prepare the host first: gVisor, user-namespace remapping, sandbox firewall (deploy/README.md)
docker compose up -d        # or: make up

[!IMPORTANT] Set up the host as described in deploy/README.md before going public.

Your account. Set ACF_ADMIN_EMAIL and ACF_ADMIN_PASSWORD in .env to create your account at startup; sign-ups are then closed unless ACF_ALLOW_SIGNUP=true. Without them, open https://<ACF_DOMAIN>, create the first account, then set ACF_ALLOW_SIGNUP=false.

HTTPS. Caddy gets and renews the certificate; ports 80 and 443 must be open. To use other host ports, set ACF_HTTP_PORT / ACF_HTTPS_PORT (e.g. 127.0.0.1:8088 behind a tunnel or another proxy). When that tunnel or proxy terminates HTTPS (e.g. Cloudflare Tunnel), also set ACF_CADDY_ADDRESS=:80 so Caddy serves plain HTTP. Browsers only offer to install the web app as an app over HTTPS (or on localhost).

Images. The stack pulls published images (ACF_REGISTRY / ACF_VERSION in .env), by default the version of the checkout you run it from. To build from source instead, run docker compose up -d --build. Versions and upgrades: docs/releasing.md.

Data. PostgreSQL runs in its own container (volume postgres-data); workspaces live in ./data, or ACF_DATA_PATH. Back up both. Logs are rotated and the app has health checks: /api/health is liveness (the process answers) and /api/health/ready is readiness (200 with {"db":"ok","bus":"ok"} when the database and, with ACF_REDIS_URL, Redis answer within 2 s; 503 otherwise). Point a load balancer or a Kubernetes readiness probe at the ready route and a liveness probe at the live one.

Security. Each user gets one sandbox container. The app runs as a non-root user and never touches the Docker socket: a small proxy (docker-proxy) holds it and allows only sandbox containers with fixed, locked-down settings. Sandboxes run under gVisor, as a non-root user, on their own network, behind an egress firewall on the host.

Scaling

Run state is shared through Redis, so you can run as many app processes as you like and add or remove them at any time:

docker compose up -d --scale app=3

Caddy spreads requests and chat connections over them and picks up new ones within seconds. Any process serves any chat; each user still has one sandbox and one workspace. A stopping process lets its running agents finish first (ACF_SHUTDOWN_GRACE, default 20 s), and its clients reconnect to another one. A crashed process frees its chats after ACF_BUS_TTL (30 s).

Taking a stopping process out of the rotation is the orchestrator's job: the process closes its listening socket when SIGTERM arrives, before its readiness check could report anything. With compose, Caddy looks up the app processes every 5 s and sends a request that a stopping process refuses to another one. On Kubernetes, give the app container a preStop hook that sleeps a few seconds (sleep 5), so the pod is removed from the Service's endpoints before SIGTERM arrives, and set terminationGracePeriodSeconds to that sleep plus ACF_SHUTDOWN_GRACE plus 20 s, for the app to then stop what is still running (up to 10 s), close its connections and flush telemetry (up to 5 s). For example 45. The Helm chart does both.

Across several machines, every app process needs the same PostgreSQL, Redis and Docker proxy, and the data folder at the same path (shared storage), because sandboxes mount workspaces from the Docker host. Details: architecture.

Upgrades migrate the database first: the migrate service runs acf-migrate and the app starts once it has finished. App processes also migrate when they start (ACF_MIGRATE_ON_START, default true), and processes that start together take turns on the schema. Where a deploy tool runs migrations as their own step (a Kubernetes Job or a Helm hook), run acf-migrate there and set ACF_MIGRATE_ON_START=false on the app, which then refuses to start on an older schema. Give the Job the app's ACF_DB_URL and ACF_SECRET_KEY: migrations can encrypt and decrypt stored secrets, and without the key acf-migrate stops with a message and leaves the database as it was. It never makes a key of its own, which the app wouldn't have; a secret.key file already in ACF_DATA_DIR (a local install) is used.

During a rolling deploy the previous version's processes keep running, and restart or scale up, on the new schema. A process that finds a schema revision it doesn't know logs a warning naming both revisions and starts without migrating. That is safe only because migrations are expand/contract: each release's migrations keep the previous release working. Add tables, and columns that are nullable or have a server default, in one release; drop or rename what the code no longer uses in a later release.

Kubernetes

The Helm chart in deploy/helm/acf runs the app on Kubernetes 1.30 or later (the first release with ValidatingAdmissionPolicy), with each user's sandbox as a pod (ACF_SANDBOX=kubernetes) in the release's namespace. The app image's kubectl is 1.34, which upstream supports against API servers 1.33 to 1.35. The app only gets, creates, deletes and execs into pods, and the chart's cluster tests run on k3s 1.32, outside that range. Install one release per namespace: the guardrails' Role, RoleBinding and NetworkPolicies have fixed names. You bring:

  • PostgreSQL, and Redis for more than one replica. The chart runs neither.
  • A ReadWriteMany volume for ACF_DATA_DIR (NFS, EFS, Filestore, CephFS, ...), writable by uid 10001. The app pods mount it at /data. Each sandbox pod mounts only its user's users/<id>/workspace folder.
  • A network plugin that enforces NetworkPolicy (Calico, Cilium, k3s's built-in one; not plain flannel).
  • The two images: the app image, which includes kubectl, and the sandbox image.

Create the namespace with Pod Security restricted first. The chart refuses a namespace without the labels, but only where it can read the namespace. The check doesn't run under helm template, --dry-run without =server, or Argo CD and other tools that render with helm template. It also misses helm install --create-namespace, which makes the namespace without the labels after the check. Label the namespace yourself in all of these cases. Without the labels, the admission policy still holds sandbox pods to their limits, but nothing holds other pods in the namespace to restricted:

kubectl create namespace acf
kubectl label namespace acf pod-security.kubernetes.io/enforce=restricted \
  pod-security.kubernetes.io/enforce-version=latest pod-security.kubernetes.io/warn=restricted \
  pod-security.kubernetes.io/audit=restricted
helm install acf deploy/helm/acf -n acf \
  --set publicUrl=https://acf.example.com \
  --set secretKey="$(openssl rand -base64 48)" \
  --set database.url=postgresql://acf:…@db.example.com:5432/acf \
  --set llm.apiKey=sk-… \
  --set ingress.enabled=true,ingress.host=acf.example.com,ingress.tlsSecretName=acf-tls

Every value is described in values.yaml; ci/prod-values.yaml is a production-shaped example. What it sets up:

  • The app. A Deployment of non-root pods (uid 10001) that pass Pod Security restricted, with a read-only root filesystem. Liveness is /api/health, readiness /api/health/ready. A stopping pod sleeps shutdown.preStopSleepSeconds (10) so it leaves the Service's endpoints before SIGTERM, then gives running agents shutdown.graceSeconds (20, ACF_SHUTDOWN_GRACE); terminationGracePeriodSeconds is both plus shutdown.marginSeconds (20), which covers stopping the agents still running (up to 10 s), then closing the bus and flushing telemetry (up to 5 s each). A Service, an optional Ingress (raise its timeouts for the chat WebSockets), a PodDisruptionBudget and an optional CPU HorizontalPodAutoscaler. More than one replica needs Redis, and the chart refuses to render without it.
  • Migrations. A Job runs acf-migrate before every install and upgrade, as a Helm hook. The app runs with ACF_MIGRATE_ON_START=false. The last run's Job stays for its logs: kubectl -n acf logs job/acf-migrate.
  • Secrets. Pods get secrets only as secretKeyRef, because the app's ServiceAccount can read every pod spec in its namespace. Either give secretKey, llm.apiKey, database.url and redis.url as values, and the chart writes them into a Secret, or point existingSecret (keys ACF_SECRET_KEY and ACF_LLM_API_KEY), database.existingSecret and redis.existingSecret at Secrets you manage, such as the uri key of a CloudNativePG cluster's app Secret. With existingSecret, the database and Redis URLs must come from Secrets too. The pods carry a hash of the chart's Secret, so that new values restart them, and that hash covers secretKey: without it, anyone who can read pods could guess a password in a URL offline. The chart's own Secret is a Helm hook too, so that it exists before the migrate Job on the first install. An upgrade replaces it before the migrate Job runs, so a failed upgrade leaves the new values in place; helm rollback puts back the values of the revision it returns to. Never change secretKey: stored secrets become unreadable. As a hook, helm uninstall leaves the Secret, and with it secretKey, so a reinstall can still read the database's secrets. Delete it yourself when you are done.
  • Rolling back. Two limits apply when you roll back from a failed upgrade:
    • Only a revision whose Secret is a pre-rollback hook puts the Secret back. Revisions made by the chart before that change don't have one, so the Secret keeps the failed upgrade's values. helm get hooks acf -n acf --revision <n> shows the revision's hooks. To return to such a revision, run helm upgrade with its values (helm get values acf -n acf --revision <n> -o yaml) instead.
    • App pods that started between the failed upgrade and the rollback read the failed upgrade's values, and keep them. Restart the app after the rollback: kubectl -n acf rollout restart deployment/acf.
  • The data volume. A ReadWriteMany claim (persistence.storageClass, persistence.size), or persistence.existingClaim. helm uninstall keeps it unless persistence.keep=false.
  • Sandbox guardrails. deploy/kubernetes/ rendered for the release: the app's ServiceAccount with its RBAC, the ValidatingAdmissionPolicies (cluster-scoped, named after the namespace) and the NetworkPolicies. The chart reads those files themselves through deploy/helm/acf/guardrails/, so the chart and the plain manifests can't drift.
  • Uninstalling. Sandbox pods belong to the app, not to the release. Before helm uninstall deletes the release, a hook Job scales the app to 0, deletes the app's RoleBinding (acf-sandboxes) so that nothing holding the app's token can start a sandbox, waits for the app pods to stop, and then deletes the sandbox pods. The hook has its own ServiceAccount, Role and RoleBinding, made as hooks too, so it also runs when a first install failed before the release's objects were made. The access admission policy lets that ServiceAccount delete only sandbox pods. The NetworkPolicies outlive the release (helm.sh/resource-policy: keep), so a sandbox pod that the hook missed (or one left by helm uninstall --no-hooks) stays cut off. A reinstall of the same release takes them over. Delete them only when no sandbox pod is left, and before you install under another release name, because a release can't take over another release's objects:
    kubectl -n acf get pods -l acf.sandbox=1          # must list no pod
    kubectl -n acf delete networkpolicy acf-sandbox-ingress acf-sandbox-egress
    
    If the hook fails, helm uninstall stops and leaves the release (scaled to 0, perhaps without the app's RoleBinding) and the Job's logs (kubectl -n acf logs job/acf-delete-sandboxes). Run helm uninstall again once the cause is fixed. helm uninstall --no-hooks removes the release without the hook. After it, delete the sandbox pods and what the hook left:
    kubectl -n acf delete pod -l acf.sandbox=1
    kubectl -n acf delete job,serviceaccount,role,rolebinding -l app.kubernetes.io/component=delete-sandboxes
    

Not covered: Kubernetes has no per-pod process limit, so set the kubelet's podPidsLimit on the nodes that run sandboxes. A gVisor RuntimeClass (sandbox.runtimeClass) is checked by the admission policy but untested here. deploy/helm/acf/ci/smoke.py installs the chart on a one-node cluster and checks it end to end.

Configuration

Environment variables. Users choose models in Settings → Models: their own key and address per provider, which models are on in the chat's model picker, a token window per model, and a default model and effort. Each chat can switch model and effort from its message box.

Variable Default Meaning
ACF_LLM_PROVIDER anthropic Any LangChain provider id: anthropic, openai, ollama, google_genai, …
ACF_LLM_PROVIDERS providers that take an API key Providers users may choose (comma-separated, * = any). The server's own is always allowed
ACF_LLM_MODEL claude-opus-5-5 / gpt-4.1-mini Default model
ACF_MODELS_FILE built-in list JSON list of the models users can pick, with their effort levels, default effort and token window (see below)
ACF_CUSTOM_MODELS true Users may add models of their own; false limits everyone to the models list
ACF_LLM_API_KEY ANTHROPIC_API_KEY / OPENAI_API_KEY Server-wide key, used by every user without their own. Only sent to the server's provider and ACF_LLM_BASE_URL
ACF_SECRET_KEY generated in ACF_DATA_DIR/secret.key Encrypts API keys, MCP configs and OAuth tokens in the database. Required by the production stack
ACF_LLM_BASE_URL provider default e.g. http://localhost:11434/v1 with openai for Ollama
ACF_MAX_AGENT_STEPS 40 Model calls per message (and per sub-agent)
ACF_SUBAGENTS 8 Sub-agents of one run working at the same time; more wait their turn (0 = no sub-agents)
ACF_SUBAGENT_FAST_MODEL provider's small model The model a sub-agent gets when the agent asks for fast (Claude: claude-haiku-5-5, OpenAI: gpt-4.1-mini, others: the user's model)
ACF_COMPACT_TOKENS / ACF_COMPACT_KEEP_TOKENS 120000 / 20000 When to summarise old messages, and how much recent history to keep. A model with a token window set (models file or the user's settings) compacts at 80% of that window instead
ACF_CONTEXT_WINDOW model's own Context window size (tokens) for the chat's context meter when the model has no token window set; default comes from LangChain's model profile, 128000 if unknown
ACF_MEMORY_LIMIT 4000 Characters of memory.md (it goes into every prompt); the agent's writes past it are refused
ACF_REVIEW_INTERVAL 10 User messages per chat between background reviews that update memory and skills (0 = off)
ACF_AUTO_TITLES true After a chat's first reply, the chat's model names it in a few words (false: chats keep their first message as title)
ACF_SKILL_ARCHIVE_DAYS 30 Skills not read for this many days move to skills/.archive/ (0 = never; pinned: true in a skill's frontmatter keeps it)
ACF_DB_URL SQLite in ACF_DATA_DIR Database. The Docker stacks use PostgreSQL (postgresql://user:pass@host/db)
ACF_MIGRATE_ON_START true Each app process brings the database schema up to date as it starts. false: run acf-migrate first (a Kubernetes Job, say), and a process that finds an older schema exits with an error naming it
ACF_DATA_DIR ./data Workspaces (and the SQLite file when no ACF_DB_URL is set)
ACF_ADMIN_EMAIL / ACF_ADMIN_PASSWORD – Main account, created at startup; its password is reset to this value (and its sessions signed out) when it changes
ACF_ADMIN_NAME email name Display name for the main account
ACF_ALLOW_SIGNUP true, false if ACF_ADMIN_EMAIL is set Open sign-ups. When false, the first account can still be created on an empty server
ACF_COOKIE_SECURE false true behind HTTPS
ACF_SANDBOX docker docker, kubernetes (a pod per user, see below), local for development (not isolated), or your own adapter as package.module:Class (see architecture). Upgrading an adapter from 2.0.0-beta.1 or earlier: rename its exec method to run; the app refuses to start with one that still defines exec
ACF_SANDBOX_IMAGE acf-sandbox:latest Sandbox image
ACF_SANDBOX_NETWORK acf-sandbox Created when missing, with traffic between sandboxes off. none cuts sandboxes off from the internet
ACF_SANDBOX_BRIDGE acf-sbx0 Interface name of that network (the egress firewall matches it)
ACF_SANDBOX_RUNTIME – (runsc in the production stack) Container runtime, e.g. runsc for gVisor. On Kubernetes, the pods' RuntimeClass (e.g. gvisor)
ACF_SANDBOX_MEMORY / _CPUS 1g / 1 Limits per sandbox
ACF_SANDBOX_IDLE_MINUTES 30 Stop a sandbox no one has used for this long; it starts again, files intact, on the next command. 0 never stops one
ACF_SANDBOX_HOST_DATA_DIR – Host path of the data dir when the app itself runs in Docker
ACF_K8S_NAMESPACE default ACF_SANDBOX=kubernetes: the namespace of the sandbox pods (acf-sandbox-<user id>). The app reaches it with kubectl, as its ServiceAccount in the cluster or through KUBECONFIG. Apply deploy/kubernetes/ there: it limits that ServiceAccount to sandbox pods
ACF_K8S_DATA_CLAIM acf-data ACF_SANDBOX=kubernetes: the ReadWriteMany PersistentVolumeClaim that holds ACF_DATA_DIR, mounted at ACF_DATA_DIR in the app's pods. Each sandbox pod mounts its user's users/<id>/workspace from it at /workspace
ACF_MCP_PRESETS_FILE – JSON list of extra one-click apps for the Connections page (see below)
ACF_REDIS_URL – (set in the production stack) Redis for run state shared between app processes. Needed for more than one process; unset keeps it in memory
ACF_REDIS_PREFIX acf Key prefix, to share one Redis between deployments
ACF_BUS_TTL 30 Seconds before a dead process's chats, locks and background commands are freed
ACF_SHUTDOWN_GRACE 20 Seconds a stopping process gives its running agents to finish
ACF_LOG_FORMAT text json writes one JSON object per line to stderr (ts, level, logger, message, plus request_id, user_id, chat_id, run_id and task_id where they apply, and exc for a traceback). A request keeps an incoming X-Request-Id (and returns it); a run is run_id, shared by its sub-agents. Message text and tool output are never logged, and key-like tokens are redacted. Inside a span, lines also carry trace_id and span_id
OTEL_EXPORTER_OTLP_ENDPOINT – (off) OpenTelemetry traces and metrics over OTLP/HTTP (protobuf) to this collector address, e.g. http://otel-collector:4318. OTEL_EXPORTER_OTLP_TRACES_ENDPOINT / ..._METRICS_ENDPOINT turn on one signal only. Unset, nothing is exported and nothing is measured. The other standard OTEL_* variables apply (OTEL_EXPORTER_OTLP_HEADERS, OTEL_TRACES_SAMPLER, OTEL_METRIC_EXPORT_INTERVAL, OTEL_RESOURCE_ATTRIBUTES, OTEL_SDK_DISABLED…). Spans: each HTTP request (by route), acf.run, acf.turn, acf.llm, acf.tool, acf.sandbox.exec, acf.follow. Metrics: acf.runs.active, acf.run.duration, acf.tool.calls, acf.sandbox.start.duration, acf.llm.tokens, acf.acp.connections. No message text, tool arguments, commands or query strings are recorded, and no metric has a per-user label
OTEL_SERVICE_NAME acf The service name on exported traces and metrics

Models

The models users can pick come from a built-in list (Claude Opus/Sonnet/Haiku/Fable, GPT-5, GPT-5 mini, GPT-4.1 mini), or from ACF_MODELS_FILE, which replaces it:

[
  {"provider": "anthropic", "id": "claude-opus-5-5", "name": "Claude Opus 5.5",
   "efforts": ["low", "medium", "high", "max"], "effort": "medium",
   "context_window": 200000, "max_context_window": 1000000},
  {"provider": "openai", "id": "gpt-5", "efforts": ["minimal", "low", "medium", "high"], "effort": "medium"}
]

efforts are the effort levels the model accepts (left out: no effort setting) and effort the default; effort goes to Claude as output_config.effort and to OpenAI as reasoning_effort. context_window is the token window the context meter and compaction use (left out: the model's own); users may set their own up to max_context_window. Only models of providers in ACF_LLM_PROVIDERS are offered. In a user's list, models whose provider has a key (theirs, or the server's for the server's own provider) start out on.

Other LangChain providers need their package installed (pip install langchain-ollama, …).

A local model for background jobs. docker-compose.withllm.yml adds llama.cpp's llama-server with Qwen3.5 4B, sized for a Raspberry Pi 5 with 8 GB, with prompt caching. Pick it as a task's model so hourly jobs run on your own hardware: docs/local-model.md.

App connections (MCP)

Add, edit, turn off or delete connections from the form on the Connections page. Switch to JSON there to edit the whole configuration directly (same format as Claude Desktop; needed for extra keys like oauth, which the form keeps but doesn't edit). The API equivalents are PUT/DELETE /api/mcp/servers/{name} and PUT /api/mcp/config.

{
  "mcpServers": {
    "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"] },
    "linear":     { "url": "https://mcp.linear.app/mcp" },
    "internal":   { "url": "https://mcp.example.com/mcp", "headers": { "X-Api-Key": "…" } },
    "github":     { "url": "https://api.example.com/mcp", "oauth": { "client_id": "…", "scopes": ["repo"] } }
  }
}

oauth.authorize_params adds parameters to the provider's sign-in URL. Google, for example, only issues a refresh token with { "access_type": "offline", "prompt": "consent" }; without one the connection ends when the access token expires.

Popular apps. The Connections page lists remote MCP servers that support OAuth dynamic client registration — Linear, Notion, Jira & Confluence, Sentry, monday.com, Canva, Intercom, Stripe, Vercel and Hugging Face. Connect writes the entry into your configuration; Sign in does the rest, no API key needed. To add your own (or override a built-in one by id), point ACF_MCP_PRESETS_FILE at a JSON file:

[{ "id": "acme", "name": "Acme", "description": "Tickets and docs", "url": "https://mcp.acme.com/mcp" }]

Skills

A skill is a folder with a SKILL.md:

---
name: weekly-report
description: Write the weekly sales report. Use when asked for the weekly report.
---
# Weekly report
1. Run `python skills/weekly-report/make.py data/sales.csv`
2. …

Upload it as a .zip (or just the SKILL.md) on the Skills page, or ask the agent to create one — every workspace starts with a skill-creator skill that teaches it how, plus a few general skills (backend/acf/builtin_skills/). Each built-in skill is added once; one you delete stays deleted.

Editors and external apps (ACP)

The agent is reachable over the Agent Client Protocol: JSON-RPC 2.0, one message per WebSocket text frame, at ws(s)://<host>/api/acp. The web chat uses the same endpoint (with its session cookie, same origin only). Other clients authenticate with Authorization: Bearer <token>, using the access token from Settings → External apps. External access is off until a token is created; the token is shown once, stored hashed, and can be replaced or revoked at any time.

Supported: initialize, session/new, session/load (replays the history, then follows a running agent), session/list, session/prompt (text, resource links and embedded text resources), session/cancel and session/set_config_option: session/new and session/load return the chat's configOptions, a model select (the user's models that are on) and, for models that have one, an effort select (thought_level). A resource link to file:///workspace/<path> is an attached workspace file: session/load replays it as a resource_link chunk after the message's text (upload the file first with POST /api/files, keep=true). Each session is a chat in the web app. Updates are user_message_chunk, agent_message_chunk and agent_thought_chunk (streamed as the model writes; chunks of one message share _meta.acf.messageId), tool_call, tool_call_update and session_info_update. A session/prompt sent while the agent works is a steering message; its response arrives when the run ends. Extras live under _acf/ (_acf/notice, _acf/turn_end, _acf/turn_start when a finished background command wakes the agent) and _meta.acf, which other clients can ignore. The agent uses its own sandbox and connections, so cwd and mcpServers from the client are ignored.

Clients that start agents as a subprocess over stdio (most editors) can use the bridge:

ACF_ACP_TOKEN=acp_… python -m acf.acp_bridge --url wss://agent.example.com/api/acp

Contributing

Contributions are welcome. Read AGENTS.md first: it covers the layout, the rules (every feature is tested end to end, including the UI) and the workflow. The design of the agent loop is in docs/architecture.md.

make setup          # Python venv + npm install
make sandbox-image  # or set ACF_SANDBOX=local
make dev            # API :8000 + web :5173
make test           # backend tests (Docker tests run when a daemon is available)
make e2e            # Playwright end-to-end tests (writes docs/screenshots/e2e)
make e2e-docker     # the same with real Docker sandboxes (what CI runs)
make lint

Tests never call a real model: backend/tests/fakes/ has a scripted model server (Anthropic and OpenAI APIs), a dependency-free stdio MCP server and an OAuth-protected HTTP MCP server.

Design tokens live in design/tokens.json (mirroring the design system in Claude Design); cd frontend && npm run tokens regenerates src/tokens.css.

Known limitations

  • Sandboxes refuse to start when the workspace belongs to root: run the app as a normal user.
  • No per-user quotas yet (model spend, disk, number of sandboxes), and no rate limiting on sign-in.

License

MIT. See License.txt.

Explorar proyectos relacionados

Cargando…