Skip to content

Agent Layer

Talon’s agent layer sits between your messaging channels and AI providers, managing conversation flow, tool execution, and multi-step reasoning.

Channel (Telegram/Slack/...) → Agent Layer → AI Provider (OpenAI/Claude/...)
Tools & Memory
  1. Message arrives from any channel
  2. Agent loads conversation history from SQLite
  3. System prompt is built with channel context and available tools
  4. AI provider generates a response, optionally calling tools
  5. Tool execution — agent runs requested tools (file ops, shell, web search, etc.)
  6. Multi-turn — if the AI needs more tool results, steps 4-5 repeat
  7. Response sent back to the channel
  8. History persisted to SQLite for continuity

The agent can spawn sub-agents for parallel work. Each sub-agent gets its own conversation context and can use the same tools. This enables complex multi-step tasks like:

  • Research one topic while editing files for another
  • Run multiple shell commands in parallel
  • Divide a large task into independent subtasks

Talon can import and browse Claude Code sessions — the conversation transcripts from Anthropic’s CLI tool. This lets you:

  • View past Claude Code sessions in the mobile UI
  • Search across all your coding sessions
  • Continue conversations started in Claude Code
  • Bridge desktop CLI workflows with mobile access

Similarly, Talon supports Codex session import for OpenAI’s coding agent:

  • Import Codex conversation logs
  • Browse coding sessions from mobile
  • Reference past Codex work in new conversations

The agent behavior is controlled by:

  • System prompt — customizable per channel via the prompt store
  • Permission mode — controls which tools require approval (plan, ask, allow, bypass)
  • Temperature — controls response creativity (0.0-2.0)
  • Model — can be overridden per channel for different use cases
{
"default_model": "anthropic/claude-sonnet-4-20250514",
"default_temperature": 0.7,
"permission_mode": "allow"
}

When the AI requests a tool call, the agent:

  1. Checks the tool against the current permission mode
  2. If allowed, executes the tool in a sandboxed environment
  3. Returns the result to the AI for further processing
  4. Logs the tool call for audit and debugging

Available tools include file operations, shell commands, web search, memory storage, scheduling, task management, and configuration — see Agent Tools for the full list.