icogito
A modern Python CLI framework to build Agent/Multi-Agent systems on top of
pydantic-ai,pydantic-ai-harness, OpenRouter, and Tavily tools.
icogito provides an end-to-end toolkit for scaffolding, configuring, and running production-grade AI agent and multi-agent architectures. It integrates durable execution via Prefect, modular tool registry integration (including Tavily search, fetch, and crawl tools), and OpenRouter model routing.
Key Features
- CLI-Driven Scaffolding: Easily create standardized directory structures (
agents/,configs/,prompts/,schemas/,tools/,utils/) usingicogito init. - Interactive Configuration: Build single-agent and multi-agent workflow configurations interactively with
icogito configure. - System Diagnostics: Verify tools, environment setup, and framework status with
icogito doctor. - Agent Factory: Instantiates
pydantic-aiAgents dynamically from YAML configurations (AgentConfig) with portable tool output limit spilling viaLocalFileStore(no run workspace required). - Durable Execution & Subagents: Supports task durability via
PrefectDurabilityand hierarchical multi-agent delegation viaSubAgents. - Built-in Web Tools: Tavily web integration for search, fetch, and crawl capabilities with built-in retry handling.
Get Started
Prerequisites
- Python: Version
>= 3.12 - uv: Recommended fast Python package and environment manager (docs.astral.sh/uv)
- API Keys:
OPENROUTER_API_KEY: Required for model inference via OpenRouter.TAVILY_API_KEY: Required when using Tavily web tools (web_search,web_fetch,web_crawl).
Installation
Clone the repository and install dependencies using uv:
# Clone the repository
git clone https://github.com/danielrondon/icogito.git
cd icogito
# Sync project dependencies into .venv
uv sync
# (Optional) Sync test or prefect extra dependencies if developing, running tests, or using Prefect
uv sync --extra test
uv sync --extra prefect
# Or via pip:
# pip install "icogito[prefect]"
Local Environment Setup
Configure your environment variables before running agent workflows or tools:
export OPENROUTER_API_KEY="your-openrouter-api-key"
export TAVILY_API_KEY="your-tavily-api-key"
Usage
CLI Commands
The icogito CLI provides commands for project initialization, diagnostics, and agent configuration.
1. Initialize Project Scaffolding (icogito init)
Scaffold a standard agent directory structure in your project or a target directory:
# Initialize scaffolding in the current directory
uv run icogito init
# Or specify a target directory
uv run icogito init ./my_agent_project
This creates the following directory layout:
.
├── agents/
├── configs/
├── prompts/
├── schemas/
├── tools/
└── utils/
2. System Diagnostics (icogito doctor)
Check system environment status, global app directory path, available Tavily web tools, and AgentFactory readiness:
# Run standard diagnostic check
uv run icogito doctor
# Verbose diagnostic output
uv run icogito doctor --verbose
3. Interactive Agent Configuration (icogito configure)
Interactively configure single or multi-agent systems. This wizard prompts for agent names, OpenRouter models, providers, instructions, enabled tools, and subagents, then generates the corresponding YAML configs in configs/ and Markdown instructions in prompts/:
uv run icogito configure
Programmatic Usage
icogito provides high-level utilities and AgentFactory for loading configs and instantiating runtime agents.
Prefect Integration & Durable Execution
Prefect is an optional dependency. When importing Prefect modules in your code or agents (e.g., from prefect import flow, task), always use a try...except ImportError block:
try:
from prefect import flow, task
HAS_PREFECT = True
except ImportError:
HAS_PREFECT = False
If you attempt to instantiate an agent with Prefect durability without prefect installed, icogito will instruct you to install the extra via pip install "icogito[prefect]".
Loading Configuration and Instantiating Agents
AgentFactory dynamically builds pydantic-ai Agent instances from AgentConfig models. Built-in capability limits (via ToolOutputLimits) use LocalFileStore to spill large tool outputs to the host temp directory automatically, ensuring agents run portably when icogito is installed as a library without requiring a pydantic-ai run workspace.
import os
from icogito.factory import AgentFactory
from icogito.utils.load_agent_config import load_agent_config
# Load agent configuration from YAML
config = load_agent_config("configs/research_agent_config.yaml")
# Initialize AgentFactory with your OpenRouter API Key
factory = AgentFactory(openrouter_api_key=os.getenv("OPENROUTER_API_KEY"))
# Create a pydantic-ai Agent instance
agent = factory.create_agent(config)
# Run the agent (async)
# result = await agent.run("Research recent developments in AI agent frameworks.")
Multi-Agent Setup with Subagents
When building a multi-agent system, subagent configurations are registered with AgentFactory:
from icogito.factory import AgentFactory
from icogito.utils.load_agent_config import load_agent_config
# Load root agent config and subagent configs
sub_config = load_agent_config("configs/sub_researcher_config.yaml")
root_config = load_agent_config("configs/root_manager_config.yaml")
# Register subagent configs map
subagent_configs = {
sub_config.agent_name: sub_config
}
factory = AgentFactory(
openrouter_api_key=os.getenv("OPENROUTER_API_KEY"),
subagent_configs=subagent_configs
)
# Build the root agent (automatically wires subagents recursively)
root_agent = factory.create_agent(root_config)
Development & Testing
To run the full test suite using pytest:
uv run --extra test pytest
Authors
- Daniel Rondon — hello@danielrondon.com
Metadata
Release files for icogito 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| icogito-0.2.2.tar.gz | 10.8 kB | Without provenance | Details for icogito-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| icogito-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for icogito-0.2.2-py3-none-any.whl |
Total release size: 24.9 kB
Release files / icogito-0.2.2.tar.gz
| Download URL | icogito-0.2.2.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76c7ab8a0190a0a014783fe76389449e1a2c460535f57933c48fa83c07813eaa
|
|
BLAKE2b-256 checksum How to use checksums |
0ed823115d9b63cc360c945659d2809b6a2162164cbacca340511e0470fb9c3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / icogito-0.2.2-py3-none-any.whl
| Download URL | icogito-0.2.2-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fc5b5829c0f131b03518ba3e1d1fd16754728bf193dc8de297d2165d475f48f
|
|
BLAKE2b-256 checksum How to use checksums |
76756d24a1556b4f01beaff6db6dde8a8b3ae777aeb202a571901061ca28bb87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for icogito 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.