polpo-agents
Polpo Agent Design
Agent Configuration
An agent is defined by its AgentConfig. Create via API or dashboard.
{
name: "coder", // unique identifier
role: "Senior Full-Stack Engineer", // human-readable role description
model: "xai/grok-4-fast", // provider/model format
allowedTools: ["bash", "read", "write", "edit", "glob", "grep"],
systemPrompt: "You are a senior engineer. Write clean, tested code.",
maxTurns: 150, // max LLM turns per session
maxConcurrency: 3, // max parallel tasks
reasoning: "medium", // thinking depth
}
Model Selection
Format: provider/model. Choose based on task complexity and cost.
| Use Case | Recommended | Why |
|---|---|---|
| Fast coding tasks | xai/grok-4-fast |
Fast, capable, good tool use |
| Complex reasoning | anthropic/claude-sonnet-4 |
Best reasoning |
| Budget tasks | xai/grok-3-mini-fast |
Cheap, fast |
| Vision tasks | openai/gpt-4o |
Strong multimodal |
Browse all available models at polpo.sh/api/gateway/models (JSON) or see docs.polpo.sh/developers/reference/providers for a guide.
Tools
Tools define what an agent can do. Assign only what's needed — follow the principle of least privilege. Every tool must be explicitly listed in allowedTools to be available.
Coding Tools
bash— Execute shell commands (sandboxed)read— Read fileswrite— Create/overwrite filesedit— Search-and-replace in filesglob— Find files by patterngrep— Search file contents
Additional Tools
Polpo supports additional tool categories (integration, email, image generation, and more). Each must be explicitly assigned in allowedTools — agents have no tools by default beyond what you configure.
For the complete tool catalog, see docs.polpo.sh/docs/agents/tools.
Security Notes
- All tool execution runs inside an isolated sandbox — agents cannot access the host system or other projects.
vault_getonly returns credentials explicitly assigned to that agent. Agents cannot access other agents' credentials.email_*tools enforceemailAllowedDomains— restrict which domains an agent can email.- Follow the principle of least privilege — only assign tools an agent actually needs for its role.
System Prompt
The system prompt defines the agent's behavior. Keep it focused.
You are {name}, a {role}.
{Core instructions — what to do, how to do it}
{Constraints — what NOT to do}
{Output format preferences}
Good system prompt:
You are a code reviewer. Review code for bugs, security issues, and performance problems.
Be concise. Flag critical issues first. Suggest fixes with code examples.
Never approve code with SQL injection or XSS vulnerabilities.
Bad system prompt: Overly long, generic instructions that Claude already knows.
Identity
For agents that interact with humans (email, chat, social), define an identity:
identity: {
displayName: "Alex",
title: "Engineering Lead",
bio: "I help teams ship reliable software.",
tone: "Direct, technical, no fluff",
personality: "Pragmatic problem-solver",
responsibilities: [
{ area: "Code review", description: "Review all PRs", priority: "critical" },
{ area: "Architecture", description: "System design decisions", priority: "high" },
],
socials: { github: "alex-eng", twitter: "@alex_ships" },
}
For more on agent identity, see docs.polpo.sh/docs/agents/definition.
Memory
Memory persists across sessions. Two levels:
Project Memory
Shared by all agents. Use for project context, conventions, architecture decisions.
# Project Context
- Next.js 15 + TypeScript + Tailwind
- PostgreSQL via Drizzle ORM
- Deploy on Vercel
# Conventions
- Use Vitest for tests
- Prefer server components
- No default exports (except pages)
Agent Memory
Private to one agent. Auto-accumulated as the agent works. Use for agent-specific learnings.
# Learned Preferences
- User prefers functional style over classes
- Always run tests before committing
- Use pnpm, not npm
Memory is read by the agent at the start of each session. Update via API:
PUT /v1/memory— project memoryPUT /v1/memory/agent/{name}— agent memory
For more on memory, see docs.polpo.sh/docs/agents/memory.
Vault
Store service credentials that agents access at runtime. Credentials are scoped per-agent — an agent can only access entries explicitly assigned to it.
// Store credentials
POST /v1/vault/entries
{
agent: "emailer",
service: "gmail",
type: "smtp",
credentials: { host: "smtp.gmail.com", port: 587, user: "...", pass: "..." }
}
// Agent uses vault_get("gmail") at runtime — credentials never in system prompt
Credential types: smtp, imap, oauth, api_key, login, custom.
For more on vault, see docs.polpo.sh/docs/agents/vault.
Agent Patterns
See references/patterns.md for multi-agent architectures, specialization patterns, and reporting hierarchies.
Need Help Designing Your Agent?
Not sure which tools, model, or configuration your agent needs? Ask your coding agent:
"I want to create a Polpo agent that [describe what it should do]. Help me choose the right model, tools, and system prompt. Use the polpo-agents skill for reference."
Your coding agent will help you pick the right configuration based on your use case.
More from lumea-labs/polpo-skills
polpo
Build production AI agents with Polpo — the open composable backend for agents with integrated sandbox runtime, tasks and workflows, and AI Gateway. Use this skill whenever working with Polpo projects, .polpo/ directories, agent configuration, tools, memory, vault, teams, tasks, missions, skills, deployments, or the Polpo CLI/API. Triggers on "polpo", "agent", ".polpo/", "polpo.json", "agents.json", "polpo deploy", "polpo create", "polpo link", "polpo install", agent tools, agent memory, agent vault, system prompt design, multi-agent architecture, or any mention of Polpo.
16polpo-react
Build AI agent interfaces with Polpo UI — composable React chat components, CLI tools, and starter templates. Use when the user wants to create a chat app, add chat components, install @polpo-ai/chat, scaffold a Polpo project, configure theming/dark mode, use ChatInput, ChatMessage, ChatSessionList, or any Polpo UI component. Triggers on "polpo ui", "chat UI", "chat component", "@polpo-ai/chat", "@polpo-ai/ui", "create-polpo-app", "chat input", "session list", "agent selector", "chat interface", "polpo chat", "chat widget", "multi-agent".
16polpo-cloud
Deploy and manage AI agents on Polpo Cloud using the CLI. Use when the user wants to deploy agents, manage API keys, configure LLM provider keys (BYOK), check project status, or any Polpo Cloud infrastructure task. Triggers on "polpo deploy", "polpo cloud", "polpo CLI", "deploy agent", "BYOK", "LLM keys", "polpo login".
9polpo-sdk
Integrate Polpo AI agents into any TypeScript/JavaScript application using @polpo-ai/sdk. Use when the user wants to add AI agent chat, completions API, streaming SSE, session management, memory, webhooks, or any Polpo API integration into their code. Triggers on "polpo", "agent chat", "completions API", "polpo sdk", "@polpo-ai/sdk", "AI agent integration".
9polpo-ui
Build AI agent interfaces with Polpo UI — composable React chat components, CLI tools, and starter templates. Use when the user wants to create a chat app, add chat components, install @polpo-ai/chat, scaffold a Polpo project, configure theming/dark mode, use ChatInput, ChatMessage, ChatSessionList, or any Polpo UI component. Triggers on "polpo ui", "chat UI", "chat component", "@polpo-ai/chat", "@polpo-ai/ui", "create-polpo-app", "chat input", "session list", "agent selector", "chat interface", "polpo chat", "chat widget", "multi-agent".
8