Agents

Agents Overview

An agent in Open Astra is a configured AI entity with its own model, system prompt, skill set, tool set, and permission profile. Agents are the primary unit of work — every conversation, background task, and scheduled job runs inside an agent.

What makes an agent

ComponentDescription
ModelThe underlying LLM (provider + model ID). Can be swapped at runtime.
System promptThe agent's persona and instructions. Supports template variables from context.
SkillsHigh-level capabilities composed from tools. E.g. web-research, code-review.
ToolsIndividual callable functions available during the agent loop.
MemoryAccess to session, daily notes, user profile, knowledge graph, and procedural tiers.
PermissionsWorkspace grants, quotas, and approval requirements for sensitive actions.

Agent lifecycle

When a user sends a message, the agent goes through a fixed lifecycle:

  1. Context assembly — workspace files, memory results, and tool definitions are injected into the prompt.
  2. Budget pre-flight — estimated token cost and tool calls are checked against quotas before inference starts.
  3. Inference — the model generates a response or tool calls.
  4. Tool execution — any tool calls are run, results are appended, and inference continues.
  5. Post-turn save — the conversation is persisted and memory extraction runs asynchronously.

See Agent Loop for the full technical breakdown.

Capability categories

CategoryPages
CoreCreating, Loop, Context, Cloning, Budget Pre-Flight
ObservabilityMetrics, Compaction Forecast
OrchestrationSwarms, Blackboard, Debate, Meta-Controller, Planner
ReliabilitySelf-Healing, Approvals, Quotas, Ethical Check
AutonomousDeep Research, Dream Mode, Heartbeat, Scheduled

Defining agents

Agents can be defined three ways: in astra.yml, via the REST API, or directly in the database. The YAML approach is recommended for version-controlled deployments.

yaml
agents:
  - id: assistant
    displayName: Assistant
    model:
      provider: openai
      modelId: gpt-4o
    systemPromptTemplate: You are a helpful assistant for {{workspace.name}}.
    skills:
      - web-research
      - code-review
    tools:
      - file_read
      - file_write

See Creating Agents for the full configuration schema.

Next steps