How agents are structured and defined
mainAn Agent is a combination of a Prompt, Tools (Function Calling), and Documents (RAG). Each agent resides in its own directory within the agents/ folder and follows this structure:
└── agents
└── myagent
├── functions.json # JSON declarations (Auto-generated)
├── index.yaml # Agent definition
├── tools.txt # Shared tools
└── tools.{sh,js,py} # Agent-specific toolsThe index.yaml file defines the agent's behavior. Key fields include:
name: The agent's name.description: A description of the agent.version: The version string.instructions: The system prompt/instructions for the LLM.conversation_starters: A list of suggested user prompts.variables: Custom variables available to the agent.documents: A list of local files, directories, or remote URLs for RAG.
name: TestAgent
description: This is test agent
version: 0.1.0
instructions: You are a test ai agent to ...
conversation_starters:
- What can you do?
variables:
- name: foo
description: This is a foo
documents:
- local-file.txt
- local-dir/
- https://example.com/remote-file.txt