Skip to main content

Daniel's Agents

Dynamic agent registry and the ask_agent dispatcher for specialized AI subagents.

Overview

Daniel's Agents is a system for registering, managing, and invoking specialized AI agents. Unlike Claude Code's built-in Task tool (which has fixed, predefined subagent types), this system allows you to:

  • Register custom agents with their own MCP tools and personalities
  • Route requests dynamically to any registered agent via ask_agent
  • Configure agents as data - system prompts, tools, and models stored in PostgreSQL

The key insight: agents are configuration, not code. Each agent is a row in a database with its MCP servers, system prompt, and model preference. The ask_agent tool looks up the config and invokes the Claude Agent SDK.

The Agent Registry

Agents are stored in the argus.agents table:

FieldDescription
idUnique identifier (e.g., venus, sentinel)
nameDisplay name
descriptionWhat the agent does
categoryAgent type: design, qa, research, etc.
commandCLI command for the agent
modelClaude model to use
configJSONB with mcp_servers, system_prompt, permission_mode
is_activeWhether the agent is available

Built-in Agents

Two agents are seeded by default:

Venus (Design Specialist)

{
"mcp_servers": {
"magic": {"command": "npx", "args": ["-y", "@anthropic/magic-mcp"]},
"context7": {"command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"]}
},
"system_prompt": "You are Venus, a design specialist. Help users create beautiful, accessible, and responsive UI components.",
"permission_mode": "bypassPermissions"
}

Venus has access to:

  • magic-mcp: 21st.dev component library for finding UI components
  • context7: Documentation lookup for frameworks

Sentinel (QA Specialist)

{
"mcp_servers": {
"playwright": {"command": "npx", "args": ["-y", "@anthropic/mcp-playwright"]},
"context7": {"command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"]}
},
"system_prompt": "You are Sentinel, a QA specialist. Be skeptical. Verify everything works. Use TodoWrite to create checklists.",
"permission_mode": "bypassPermissions"
}

Sentinel has access to:

  • playwright-mcp: Browser automation for E2E testing
  • context7: Documentation lookup

The ask_agent Tool

The core dispatcher tool that routes requests to any registered agent:

ask_agent(agent_id="venus", request="Design a login form with email and password")

How It Works

┌─────────────────────────────────────────────────────────────┐
│ Claude Code (Main Agent) │
│ │
│ "I need a React component for user settings" │
│ │
└──────────────────────────┬────────────────────────────────────┘
│ ask_agent(agent_id="venus", request="...")

┌─────────────────────────────────────────────────────────────┐
│ Janus MCP Server │
│ │
│ 1. Fetch agent config from argus.agents │
│ 2. Build ClaudeAgentOptions from stored config │
│ 3. Invoke Claude Agent SDK with config │
│ 4. Stream response back │
│ │
└──────────────────────────┬────────────────────────────────────┘
│ Agent SDK invocation

┌─────────────────────────────────────────────────────────────┐
│ Venus Subagent │
│ │
│ Brain: Claude Sonnet │
│ Tools: magic-mcp, context7 │
│ Prompt: "You are Venus, a design specialist..." │
│ │
│ Returns: Component code, usage examples, dependencies │
│ │
└─────────────────────────────────────────────────────────────┘

Parameters

ParameterTypeRequiredDescription
agent_idstringYesAgent ID to invoke (e.g., venus, sentinel)
requeststringYesThe task or question for the agent
contextstringNoAdditional context to include

Example Response

{
"agent_id": "venus",
"agent_name": "Venus",
"response": "Here's a login form component using shadcn/ui..."
}

Agent Management Tools

List Agents

janus_agent_list(category="design", include_inactive=false)

Returns all registered agents, optionally filtered by category.

Get Agent Details

janus_agent_get(agent_id="venus")

Returns full agent configuration including MCP servers and system prompt.

Register New Agent

janus_agent_register(
agent_id="athena",
name="Athena",
command="athena",
description="Research specialist - documentation and best practices",
category="research",
model="claude-sonnet-4-20250514",
config={
"mcp_servers": {
"context7": {"command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"]}
},
"system_prompt": "You are Athena, a research specialist. Find documentation, cite sources, distinguish facts from opinions.",
"permission_mode": "bypassPermissions"
}
)

Update Agent

janus_agent_update(
agent_id="venus",
model="claude-opus-4-20250514",
is_active=true
)

Delete Agent

janus_agent_delete(agent_id="athena")

Reeves Personas

The agent registry is also the foundation for Reeves, Daniel's personal life management system. Reeves uses personas - specialized agents for different domains:

PersonaRoleDomain
ReevesChief of StaffTask management, scheduling
PennHistorianJournals, reflections, mood tracking
FinchRetrieverRead-only search across all domains
HartleyTrainerFitness metrics, health logs
SterlingCFOFinancial advice (reads Tally data)
TallyBookkeeperDouble-entry accounting ledger

These personas share the same PostgreSQL backend as infrastructure agents but operate on personal data:

  • service_id = djs-personal for personal tasks
  • journals table for Penn
  • health_logs table for Hartley
  • tally.* schema for financial ledger

The architecture principle: personas are configuration, not separate codebases. One unified system, specialized behaviors.

API Endpoints

The agent registry is also accessible via REST API:

MethodEndpointDescription
GET/api/v1/agentsList all agents
GET/api/v1/agents/{id}Get agent details
POST/api/v1/agentsRegister new agent
PATCH/api/v1/agents/{id}Update agent
PATCH/api/v1/agents/{id}/configUpdate agent config section
DELETE/api/v1/agents/{id}Delete agent
POST/api/v1/agents/initInitialize table with defaults

Comparison: Task Tool vs ask_agent

CapabilityClaude Code Task Toolask_agent
Spawn subagentsYesYes
Custom MCP serversNo (fixed types)Yes (any)
Custom system promptNoYes
Model selectionLimitedFull
Tool restrictionsNoVia config
Agent as dataNo (hardcoded)Yes (database)
Dynamic registrationNoYes

When to Use Each

Use Task Tool when:

  • You need basic exploration (Explore)
  • You want implementation planning (Plan)
  • The predefined types fit your needs

Use ask_agent when:

  • You need custom MCP tools (magic-mcp, playwright, etc.)
  • You want specialized personalities (Venus, Sentinel, etc.)
  • You're building reusable agent patterns
  • You need the agent configuration to be dynamic

Creating Your Own Agent

Step 1: Define the Specialty

What does this agent do better than a general-purpose agent?

AgentSpecialtyKey Tools
VenusUI/UX designmagic-mcp, context7
SentinelQA testingplaywright, context7
AthenaResearchcontext7, web search
HermesAPI integrationHTTP tools

Step 2: Choose MCP Tools

Select tools that match the specialty. Keep it focused - fewer tools = more focused agent.

Step 3: Write the System Prompt

Define personality and constraints:

You are [Name], a [specialty] specialist.

Your role:
1. [Primary responsibility]
2. [Secondary responsibility]

You do NOT:
- [Constraint 1]
- [Constraint 2]

Return [expected output format].

Step 4: Register the Agent

janus_agent_register(
agent_id="my-agent",
name="My Agent",
command="my-agent",
description="What this agent does",
category="category",
config={
"mcp_servers": {...},
"system_prompt": "...",
"permission_mode": "bypassPermissions"
}
)

Step 5: Invoke It

ask_agent(agent_id="my-agent", request="Do the thing")

See Also