Mastering the T20 Multi-Agent System

Chapter 6: Project Structure and Internals

This chapter provides a technical overview of the T20 system's architecture and how to customize it. We will delve into the directory layout, the purpose of key files and modules within the runtime/ directory, and discuss methods for customizing orchestration logic and advanced prompt engineering techniques.

6.1 Directory Layout Explained

The T20 project follows a structured directory layout designed for clarity and maintainability:


t20-multi-agent/

	├── agents/                 # YAML definitions for each agent
	│   ├── orchestrator.yaml
	│   ├── lyra.yaml
	│   ├── aurora.yaml
	│   ├── kodax.yaml
	│   └── tase.yaml

	├── prompts/                # System prompts and instructions for agents (can be text files or structured data)
	│   ├── orchestrator_instructions.txt
	│   └── ...

	├── runtime/                # Core Python source code for the framework
	│   ├── __init__.py
	│   ├── executor.py         # Main execution logic, agent classes, CLI entry point
	│   └── loader.py           # Utilities for loading configs, agents, and prompts

	├── sessions/               # Output directory for all runtime sessions (auto-generated)
	│   └── session_...
	│       ├── initial_plan.json
	│       ├── 0__step_0_Lyra_result.txt
	│       └── ...

	├── setup.py                # Project setup and dependencies definition
	├── README.md               # Project overview and documentation
	└── .env                    # Environment variables (e.g., API keys)

6.2 The runtime/ Module

The runtime/ directory is the heart of the T20 framework's execution logic.

6.3 Customizing the Orchestration Logic

For advanced users seeking to modify the system's core behavior, the orchestration logic offers avenues for customization:

Note: Customizing core logic requires a good understanding of the Python codebase and the T20 framework's internal workings.

6.4 Advanced Prompt Engineering Techniques

Effective prompt engineering is crucial for maximizing agent performance. Best practices include:

The T20 system's integration with Lyra allows for dynamic adaptation of these techniques during runtime, further optimizing the results.