Skip to content

Agents

An agent in Moneypenny is a self-contained unit of intelligence backed by a single SQLite file. That file contains the agent’s memory, policies, skills, knowledge, audit trail, sessions, and tool definitions.

Because Moneypenny exposes its entire surface area via MCP (Model Context Protocol), every operation that works from the CLI also works as a natural language request through any MCP-compatible client — Claude Desktop, Cursor, or anything else that speaks the protocol.

Agent Anatomy

Every agent has:

ComponentStoragePurpose
Factsfacts tableLong-term structured memory
Messagesmessages tableConversation history
Knowledgedocuments + chunks tablesIngested documents
Skillsskills tableReusable procedures and tool definitions
Policiespolicies tableGovernance rules
Jobsjobs + job_runs tablesScheduled tasks
Auditpolicy_audit tableDecision log
Scratchscratch tableSession-scoped working memory

Creating Agents

Initialization creates a default agent named main:

Terminal window
mp init

Create additional agents:

Terminal window
mp agent create research
mp agent create ops-bot

Agent creation goes through the canonical operation pipeline — policy-checked, hooked, and audited like any other mutation.

Agent Configuration

Each agent is configured in moneypenny.toml:

[[agents]]
name = "main"
trust_level = "standard"
persona = "You are a helpful engineering assistant."
[agents.llm]
provider = "anthropic" # or "local" for GGUF, "http" for other APIs
# api_base = "https://api.openai.com"
# api_key = "sk-..."
# model = "gpt-4o"
[agents.embedding]
provider = "local"
model = "nomic-embed-text-v1.5"
dimensions = 768

Update config at runtime:

Terminal window
mp agent config main persona "You are a senior SRE."

Trust Levels

Agents have a trust level that policies can reference:

  • standard — default, subject to all policy rules
  • elevated — can be granted access to restricted resources
  • admin — full access (still audited)

Trust levels are labels — their meaning is defined by the policies you write.

Listing and Inspecting

Terminal window
mp agent list
mp agent status
mp agent status research

Status shows memory stats: fact count, session count, document count, and skill count.

Deleting Agents

Terminal window
mp agent delete research --confirm

This removes the agent from the registry and deletes its database file.

Multi-Agent Architecture

When running mp start, each agent runs as a separate worker process. The gateway routes messages to the correct worker based on agent name. Agents can delegate to each other with depth-limited recursion.

Gateway
├── Worker: main (main.db)
├── Worker: research (research.db)
└── Worker: ops-bot (ops-bot.db)

Facts, skills, policies, and jobs can sync between agents via CRDT. Conversations and scratch stay local to each agent.

Portability

An agent is its database file. To move an agent:

Terminal window
cp mp-data/main.db /backup/main.db # backup
scp mp-data/main.db server:/agents/main.db # transfer

Open with any SQLite client to inspect:

Terminal window
sqlite3 mp-data/main.db "SELECT pointer, confidence FROM facts WHERE status='active';"