Guides · Agents & copilots
Building with agents
Agents call your project with explicit credentials, and your schema’s access rules govern every row read or changed over MCP, A2A and HTTP.
Agents as callers#
Napalm has no separate permission system for agents. Every agent connects as an ordinary caller, and the compiled access rules in your schema decide every row it can read or modify.
Caller-bound identities
Agents authenticate with a service key, user consent or a dedicated identity.
Built-in protocol surfaces
Every project exposes deployed queries and actions over MCP, A2A and HTTPS.
Scoped row grants
Grant rows open chosen records until expiry and revoke access on delete.
Choose one of three credential models depending on whether the agent acts for your backend, on a user’s behalf or inside an isolated workflow stage. Agent access & grants covers all three in detail.
| Caller | Acts as | Common use |
|---|---|---|
| A service key | Your backend. Calls carry the branch’s service globals, and a read-only key cannot write. | Common useYour own coding agent, nightly job or internal tool. |
| User consent | That user until the grant expires. The user can restrict the agent to reads or revoke access. | Common useAn external assistant such as Claude or ChatGPT connected by one of your users. |
| An agent identity | The agent’s own ext::auth::Identity, which reaches zero rows until a grant row opens access. | Common useWorker agents scoped to selected records or pipeline stages. |
MCP, A2A and HTTP#
Every project serves three protocol surfaces that evaluate the same compiled access policies and stamp each commit’s source (mcp, a2a or http) in the change log.
- MCP
- Exposes the Model Context Protocol at
/mcp. Connected assistants receive each offered deployed query as a typed tool alongside optional ad-hoc queries, hybrid search and schema inspection. See MCP server. - A2A
- Serves Agent-to-Agent discovery and calls at
/a2a. Peer agents read a caller-scoped agent card and invoke offered skills synchronously. See A2A agent. - HTTP
- Accepts direct calls to the project API from your own agent code through a generated typed client or plain HTTPS.
Starting points#
Pick the guide matching how your agent connects, from local editor setup and in-app copilots to staged worker pipelines and instant kill switches.
| Goal | Guide | Summary |
|---|---|---|
| Connect a coding agent | Coding agents | SummaryOne command writes the agent instructions and MCP config without putting secrets in git. |
| Add an assistant inside your app | In-app AI copilots | SummarySearches and answers run under the signed-in user’s session, and mutations wait for approval. |
| Curate tools for an agent | Tools for agents | SummaryOffer chosen deployed queries as tools and write clear descriptions for models. |
| Run agents in stages | Multi-agent pipelines | SummaryGive each stage a separate sign-in over one shared table and hold final approval for a person. |
| Audit or stop an agent | Watching and stopping an agent | SummaryInspect an agent’s commits and row reach, and revoke access immediately. |
Agent loop and memory#
Napalm stores your data and enforces access policies, while your own service or your user’s assistant runs the model loop.
Agent memory lives in ordinary schema types such as threads, notes and prior attempts. Declare those types and their access rules in dbschema/default.gel to search, stream and back up memory rows alongside the rest of your application.