Skip to main content

Minimal, local-first agent runner using Markdown front matter.

Project description

Simple Agent

Simple Agent is a minimal, local-first agent runner that loads agent definitions from Markdown front matter and executes a small chain of steps with limited context handling. It is intentionally small and explicit: you define the model, tools, and steps in a single Markdown file, and the orchestrator runs those steps in order with a bounded prompt preamble.

Project Goal

Provide a simple, maintainable agent framework that:

  • Uses Markdown front matter for agent configuration.
  • Runs a deterministic chain of steps (text or structured output).
  • Keeps context handling deliberately limited and predictable.
  • Supports local tools and simple inter-agent calls.

Install

pip install quick-agent

If you are working from source:

python -m venv .venv
. .venv/bin/activate
pip install -e .

Hello World Example

Create agents/hello.md:

---
name: "Hello Agent"
description: "Minimal example"
model:
  provider: "openai-compatible"
  base_url: "http://localhost:11434/v1"
  api_key_env: "OPENAI_API_KEY"
  model_name: "llama3"
chain:
  - id: hello
    kind: text
    prompt_section: step:hello
output:
  format: json
  file: out/hello.json
---

## step:hello

Say hello to the input.

Then run:

quick-agent --agent hello --input safe/path/to/input.txt

Note: by default, file access is restricted to the safe/ directory (use --safe-dir to change it). Agents can further restrict access with safe_dir in frontmatter (relative to the safe root).

If you omit the entire model: section, the defaults are:

model:
  provider: "openai-compatible"
  base_url: "https://api.openai.com/v1"
  api_key_env: "OPENAI_API_KEY"
  model_name: "gpt-5.2"

Structured Output Example

Create agents/structured.md:

---
name: "Structured Agent"
model:
  provider: "openai-compatible"
  base_url: "http://localhost:11434/v1"
  api_key_env: "OPENAI_API_KEY"
  model_name: "llama3"
schemas:
  Summary: "quick_agent.schemas.outputs:SummaryOutput"
chain:
  - id: summarize
    kind: structured
    prompt_section: step:summarize
    output_schema: Summary
output:
  format: json
  file: out/summary.json
---

## step:summarize

Summarize the input into a short title and 2 bullet points.

Define the schema in src/quick_agent/schemas/outputs.py (example below):

from pydantic import BaseModel


class SummaryOutput(BaseModel):
    title: str
    bullets: list[str]

Then run:

quick-agent --agent structured --input safe/path/to/input.txt

OpenAI API Example

This example uses OpenAI's API via the OpenAI-compatible provider. Set your API key in the environment:

export OPENAI_API_KEY="your-key"

Create agents/openai.md:

---
name: "OpenAI Agent"
chain:
  - id: reply
    kind: text
    prompt_section: step:reply
output:
  format: json
  file: out/openai.json
---

## step:reply

Answer the input in a short paragraph.

Then run:

quick-agent --agent openai --input safe/path/to/input.txt

Python Usage

You can also run agents programmatically:

from pathlib import Path

import anyio

from quick_agent import Orchestrator, QuickAgent
from quick_agent.agent_registry import AgentRegistry
from quick_agent.agent_tools import AgentTools
from quick_agent.directory_permissions import DirectoryPermissions


def main() -> None:
    agent_roots = [Path("agents")]
    tool_roots = [Path("tools")]
    safe_dir = Path("safe")

    registry = AgentRegistry(agent_roots)
    tools = AgentTools(tool_roots)
    permissions = DirectoryPermissions(safe_dir)

    agent = QuickAgent(
        registry=registry,
        tools=tools,
        directory_permissions=permissions,
        agent_id="hello",
        input_path=Path("safe/path/to/input.txt"),
        extra_tools=None,
    )

    result = anyio.run(agent.run)
    print(result)


if __name__ == "__main__":
    main()

How It Works

Agents are stored as Markdown files with YAML front matter and step sections:

  • Front matter declares the model, tools, schemas, and chain.
  • Body contains ## step:<id> sections referenced by the chain.

The orchestrator loads the agent, builds the tools, and executes each step in order, writing the final output to disk.

Documentation

See the docs in docs/:

Project details


Download files

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

Source Distribution

quick_agent-0.1.1.tar.gz (63.7 kB view details)

Uploaded Source

Built Distribution

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

quick_agent-0.1.1-py3-none-any.whl (63.2 kB view details)

Uploaded Python 3

File details

Details for the file quick_agent-0.1.1.tar.gz.

File metadata

  • Download URL: quick_agent-0.1.1.tar.gz
  • Upload date:
  • Size: 63.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quick_agent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9eac46ec5990724c628a2e625cd1f35ded0f9b5abce74eeeb0bf0a785ce2602b
MD5 10c36e0ecd92efc5585d0611d742b512
BLAKE2b-256 87ca2cb6f23a60bde3a0497f5cdd14258f276965ef220ccd7ac1675bd55c3b6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for quick_agent-0.1.1.tar.gz:

Publisher: publish.yml on charlesverge/quick-agent

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

File details

Details for the file quick_agent-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for quick_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a81346bbef263a7817e915819b87e6eec2beff7d2b26aabecf65aee2d29c2a9f
MD5 9430e9507e2fcd333ed1189611ee0b80
BLAKE2b-256 8ec399a62f49af80bbd2dea060649de277507cc2a98ae970cf0c70f88fa3bdd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for quick_agent-0.1.1-py3-none-any.whl:

Publisher: publish.yml on charlesverge/quick-agent

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