Skip to main content

Define AI agent roles in YAML and run them anywhere — CLI, API server, or autonomous daemon

Project description

InitRunner

InitRunner mascot

Python 3.11+ PyPI version PyPI downloads GitHub stars Docker pulls MIT License Tests v1.23.0 Ruff PydanticAI Website Discord

Website · Docs · Discord · Issues

Define AI agents in YAML. Run them as CLI tools, Telegram bots, Discord bots, API servers, or autonomous daemons. Built-in RAG, persistent memory, 40+ tools, policy-based authorization. Any model.

One YAML file is all it takes to go from idea to running agent - with document search, persistent memory, and tools wired in automatically. Start with initrunner chat for a zero-config assistant, then scale to bots, pipelines, and API servers without rewriting anything.

v1.23.0 -- Cerbos policy sets, authz attribute resolver, Docker Compose, SDK HTTP client fix. See the Changelog.

Contents

Quickstart

curl -fsSL https://initrunner.ai/install.sh | sh -s -- --extras all
initrunner setup        # wizard: pick provider, model, API key
initrunner chat --ingest ./docs/   # chat with your docs, memory on by default

Or install with a package manager: uv tool install "initrunner[all]" / pipx install "initrunner[all]". See Installation, Setup, and Chat for details.

Or run with Docker, no install needed:

docker run --rm -it -e OPENAI_API_KEY \
    -v initrunner-data:/data ghcr.io/vladkesler/initrunner:latest chat

See the Docker guide for RAG, Telegram, API server, and more examples.

Define Agent Roles in YAML

When you need more control, define an agent as a YAML file:

apiVersion: initrunner/v1
kind: Agent
metadata:
  name: code-reviewer
  description: Reviews code for bugs and style issues
spec:
  role: |
    You are a senior engineer. Review code for correctness and readability.
    Use git tools to examine changes and read files for context.
  model: { provider: openai, name: gpt-5-mini }
  tools:
    - type: git
      repo_path: .
    - type: filesystem
      root_path: .
      read_only: true
initrunner run reviewer.yaml -p "Review the latest commit"

That's it. No Python, no boilerplate. Using Claude? pipx install "initrunner[anthropic]" and set model: { provider: anthropic, name: claude-opus-4-6 }.

InitRunner Quick Chat
Quick Chat - ask a question, send the answer to Slack

User Interfaces

Terminal UI (tui) Web Dashboard (ui)
Launch initrunner tui initrunner ui
Install pip install initrunner[tui] pip install initrunner[dashboard]
Roles Create from template, edit via forms Form builder with live preview, AI generate
Chat Streaming chat with token counts SSE streaming with file attachments
Extras Audit log, memory, daemon event log Audit detail panel, memory, trigger monitor
Style k9s-style keyboard-driven (Textual) Server-rendered HTML (HTMX + DaisyUI)

See TUI docs · Dashboard docs · API Server docs

Why InitRunner

Zero config to start. initrunner chat gives you an AI assistant with persistent memory and document search out of the box. No YAML, no setup beyond an API key.

Config, not code. Define your agent's tools, knowledge base, and memory in one YAML file. No framework boilerplate, no wiring classes together. 20+ built-in tools (filesystem, git, HTTP, Python, shell, SQL, search, email, MCP, think, script, and more) work out of the box. Need a custom tool? One file, one decorator.

Version-control your agents. Agent configs are plain text. Diff them, review them in PRs, validate in CI, reproduce anywhere. Your agent definition lives next to your code.

Prototype to production. Same YAML runs as an interactive chat, a one-shot CLI command, a trigger-driven daemon, or an OpenAI-compatible API. No rewrite when you're ready to deploy.

How It Compares

InitRunner Build from scratch LangChain
Setup curl -fsSL https://initrunner.ai/install.sh | sh + API key Install 5-10 packages, write glue code pip install langchain + adapters
Agent config One YAML file Python classes + wiring Python chains + config objects
RAG --ingest ./docs/ (one flag) Embed, store, retrieve, prompt - DIY Loaders > splitters > vectorstore chain
Bot deployment --telegram / --discord flag Build bot framework integration Separate bot framework + adapter
Model switching --model flag, aliases, or change YAML Rewrite client code Swap LLM class + adjust prompts
Multi-agent compose.yaml with delegation + auto-routing Custom orchestration layer Agent executor + custom routing

What Can You Build?

  • A Telegram bot that answers questions about your codebase - point it at your repo, deploy with one flag
  • A cron job that monitors competitors and sends daily digests - cron trigger + web scraper + Slack sink
  • A document Q&A agent for your team's knowledge base - ingest PDFs and Markdown, serve as an API
  • A code review bot triggered by new commits - file-watch trigger + git tools + structured output
  • A multi-agent pipeline with auto-routing: intake > researcher / responder / escalator - sense routing picks the right target per message (initrunner examples copy support-desk)
  • A personal assistant that remembers everything - persistent memory across sessions, no setup

Features

Start with the code-reviewer above. Each step adds one capability - no rewrites, just add a section to your YAML.

Knowledge & memory

Point at your docs for RAG - a search_documents tool is auto-registered. Add memory for persistent recall across sessions:

spec:
  ingest:
    sources: ["./docs/**/*.md", "./docs/**/*.pdf"]
  memory:
    store_path: ./memory.db
    semantic:
      max_memories: 1000
initrunner ingest role.yaml   # extract | chunk | embed | store
initrunner run role.yaml -i --resume   # search_documents + memory ready

See Ingestion · Memory · RAG Quickstart.

Triggers

Turn it into a daemon that reacts to events - cron, file watch, webhook, heartbeat, Telegram, or Discord:

spec:
  triggers:
    - type: cron
      schedule: "0 9 * * 1"
      prompt: "Generate the weekly status report."
    - type: file_watch
      paths: [./src]
      prompt_template: "File changed: {path}. Review it."
initrunner daemon role.yaml   # runs until stopped

See Triggers · Telegram · Discord.

Compose agents

Orchestrate multiple agents into a pipeline - one agent's output feeds into the next. Use strategy: sense to auto-route messages to the right target:

apiVersion: initrunner/v1
kind: Compose
metadata: { name: email-pipeline }
spec:
  services:
    inbox-watcher:
      role: roles/inbox-watcher.yaml
      sink: { type: delegate, target: triager }
    triager:
      role: roles/triager.yaml
      sink: { type: delegate, strategy: sense, target: [researcher, responder] }
    researcher: { role: roles/researcher.yaml }
    responder: { role: roles/responder.yaml }

Run with initrunner compose up pipeline.yaml. See Compose · Delegation.

Security & authorization

Built-in security with optional Cerbos policy-based authorization. JWT identity, per-route ABAC checks, tool-level authorization, PlanResources filtering, and full audit trail with principal tracking:

pip install initrunner[authz]
export INITRUNNER_CERBOS_ENABLED=true INITRUNNER_JWT_SECRET=my-secret
export INITRUNNER_CERBOS_TOOL_CHECKS=true  # per-tool identity checks
initrunner ui   # routes + tool calls checked against Cerbos policies

Also includes content filtering, PEP 578 sandboxing, Docker isolation, token budgets, and rate limiting out of the box. See Cerbos Authorization · Security · Guardrails.

More capabilities

Feature Command / config Docs
Skills - reusable tool + prompt bundles spec: { skills: [../skills/web-researcher] } Skills
Team mode - multi-persona on one task kind: Team + spec: { personas: {…} } Team Mode
API server - OpenAI-compatible endpoint initrunner serve agent.yaml --port 3000 Server
Multimodal - images, audio, video, docs initrunner run role.yaml -p "Describe" -A photo.png Multimodal
Structured output - validated JSON schemas spec: { output: { schema: {…} } } Structured Output
Evals - test agent output quality initrunner test role.yaml -s eval.yaml Evals
MCP gateway - expose agents as MCP tools initrunner mcp serve agent.yaml MCP Gateway
MCP toolkit - tools without an agent initrunner mcp toolkit MCP Gateway

See Tutorial for a guided walkthrough.

Distribution & Deployment

Community roles

initrunner search "code review"                          # browse the community index
initrunner install code-reviewer                         # download, validate, confirm
initrunner install user/repo:roles/agent.yaml@v1.0       # install from any GitHub repo

See Registry.

OCI registry

Publish and install complete role bundles to any OCI-compliant container registry:

initrunner publish role.yaml oci://ghcr.io/org/my-agent --tag 1.0.0
initrunner install oci://ghcr.io/org/my-agent:1.0.0

See OCI Distribution.

Cloud deploy

Deploy on Railway Deploy to Render

Fly.io: See Cloud Deployment Guide.

Documentation

Area Key docs
Getting started Installation · Setup · Chat · RAG Quickstart · Tutorial · CLI Reference · Docker · Discord Bot · Telegram Bot
Agents & tools Tools · Tool Creation · Tool Search · Skills · Structured Output · Providers
Knowledge & memory Ingestion · Memory · Multimodal Input
Orchestration Compose · Delegation · Team Mode · Autonomy · Triggers · Intent Sensing
Interfaces Dashboard · TUI · API Server · MCP Gateway
Distribution OCI Distribution · Shareable Templates
Operations Security · Cerbos Authorization · Guardrails · Audit · Reports · Evals · Doctor · Observability · CI/CD

See docs/ for the full index.

Examples

initrunner examples list               # see all available examples
initrunner examples copy code-reviewer # copy to current directory

The examples/ directory includes 20+ ready-to-run agents, skills, and compose pipelines.

Community & Contributing

Contributions welcome! See CONTRIBUTING.md for dev setup and PR guidelines. For security vulnerabilities, see SECURITY.md.

License

MIT - see LICENSE for details.


v1.23.0

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

initrunner-1.23.0.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

initrunner-1.23.0-py3-none-any.whl (817.8 kB view details)

Uploaded Python 3

File details

Details for the file initrunner-1.23.0.tar.gz.

File metadata

  • Download URL: initrunner-1.23.0.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for initrunner-1.23.0.tar.gz
Algorithm Hash digest
SHA256 41daae07f592e4a05e810fdfeab042468812334de23eab0b9089caf2402a55f0
MD5 5d5ba2b794913dfc5306109b4d0a1423
BLAKE2b-256 f41825731e8f44f0d880dff157a294026236905d496efd76d48d73852ab9f9cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for initrunner-1.23.0.tar.gz:

Publisher: release.yml on vladkesler/initrunner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file initrunner-1.23.0-py3-none-any.whl.

File metadata

  • Download URL: initrunner-1.23.0-py3-none-any.whl
  • Upload date:
  • Size: 817.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for initrunner-1.23.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51341e90ad1a946bc7b9f5292f577e31ccf3bbed595ac6f6a5dc8c28489a88f9
MD5 41e759fca7bfb8530b6041f73277a8c8
BLAKE2b-256 75316ee6e349b86cce5d74f9627ac5ba704b7c12a1214fc6e04ba068df3c4e77

See more details on using hashes here.

Provenance

The following attestation bundles were made for initrunner-1.23.0-py3-none-any.whl:

Publisher: release.yml on vladkesler/initrunner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page