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. An agent connects as an ordinary caller, and the compiled access rules in your schema decide every row it may read or mutate across three credential models.
Caller-bound agent identity
Agents authenticate with an ndb_… service key, a user consent token or a dedicated ext::auth::Identity, with no privileged side channel.
Row-and-time-scoped grants
ext::napalm::AgentGrant and custom grant rows delegate narrow record sets with instant revocation and live-stream eviction.
| Caller | Acts as | Common use |
|---|---|---|
| A service key | Your backend. Calls carry the branch’s service globals. A read-only key cannot write. | Common useYour own coding agent, nightly job or internal tool. |
| A person’s consent | That person until the grant expires. The person can limit 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. Reaches nothing until a row grants access. | Common useSeparate agents that each receive access to selected records or pipeline stages. |
Agent access & grants covers all three in full.
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
- Every project answers the Model Context Protocol at
/mcp. An MCP assistant receives each offered deployed query as a typed tool, plus optional ad-hoc queries, hybrid search and schema inspection. See MCP server. - A2A
- Every project answers Agent-to-Agent calls at
/a2a. Peer agents inspect the caller-scoped agent card and invoke offered skills synchronously. See A2A agent. - HTTP
- Your own agent calls the project’s API 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 | SummaryThe assistant searches and answers as the signed-in user, and writes 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 board and hold final changes for a person. |
| Audit or stop an agent | Watching and stopping an agent | SummaryInspect an agent’s commits and row reach, and revoke access in four ways. |
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.