Skip to main content

picho

picho is a minimal Agent framework. It originally started as a Python implementation of pi-mono, while also borrowing some ideas from google-adk. It later grew with more extensions, mainly for general execution-oriented Agent scenarios and multimodal use cases. picho puts special emphasis on file reading, with the goal of building an Agent in a more direct way and with less machinery.

Design Philosophy

The design philosophy of picho is to be as direct and as simple as possible.

  • Direct

In many frameworks, reading a PDF or DOCX file takes two steps: find the appropriate skill, parse the file, and then let a read skill consume the parsed output. picho takes a more direct approach by optimizing the read tool itself:

  • Supports text and images.
  • After installing the extension dependencies, it can read PDF and DOCX directly.
  • WAV and MP3 files can be transcribed through the read tool. The ASR backend is configurable, with built-in mock and volcengine providers.
  • Video support is also specially optimized. picho includes a dedicated video compression step that is transparent to the model. This extends the practical size limit for video reading, allowing the model to handle larger files after compression.
    • Note: this optimization currently works only with Ark models.
  • Support for more file types such as PPTX is planned.

For the extension layer, you do not have to use the built-in read extensions. You can write your own read extensions to support new file types, or replace the existing read pipeline altogether.

And if you genuinely prefer handling files through skills, that is also perfectly fine. Built-in read is better suited to direct, general-purpose file access, while skills are better for domain-specific workflows, multi-step processing, or more complex compositions with other tools. The two are not in conflict.

  • Simple

Simplicity is one of the core design goals of picho, and that shows up in multiple places. The first is the Agent loop.

The core loop is inspired by pi-mono, and can be simplified to:

while True:
    response = model(context)      # Call the LLM
    context += response            # Append response to context

    if response.tool_calls:
        results = execute(response.tool_calls)
        context += results         # Execute tools and append results
    else:
        break                      # Stop when there are no tool calls

The loop remains intentionally small. It avoids a heavy orchestration layer, but still leaves hook points for custom control logic inside the loop.

The same idea also appears in the extension packages. Apart from cases that truly depend on ffmpeg or external services, such as video compression or audio understanding, picho tries to keep features like PDF and DOCX handling within pure Python and avoid introducing extra third-party system dependencies.

Quick Start

Installation

Using uv is recommended:

# Install
uv add picho
# If you want native read support for PDF and DOCX
uv add picho["super-reader"]
# If you want to use the Google Gemini provider
uv add picho["provider-google"]
# If you want all optional extensions in one shot
uv add picho["all"]

Usage Modes

picho commonly supports three usage modes: start the CLI directly from a config file, build a Runner dynamically in Python, or run picho as an ACP agent server for editor and agent-client integrations.

For the full configuration reference, field descriptions, and extension examples, see picho/config.md.

1. Configure config.json and start picho chat

This is the most direct mode: prepare a config file, then start an interactive session.

picho chat looks for config files in the following order:

  • .picho/config.json in the current directory
  • config.json in the current directory
  • ~/.picho/config.json in the user home directory

A minimal config example:

{
  "agent": {
    "model": {
      "model_provider": "ark-responses",
      "model_name": "doubao-seed-2-0-lite-260215",
      "base_url": "https://ark.cn-beijing.volces.com/api/v3",
      "api_key": "YOUR_ARK_API_KEY",
      "input_types": ["text", "image", "video"]
    },
    "instructions": "You are a concise and reliable AI assistant.",
    "builtin": {
      "tool": ["read", "write", "bash", "edit"],
      "skill": ["code-review", "debug", "skill-creator"]
    }
  },
  "session_manager": {
    "persist": true
  }
}

If path is omitted, picho stores its own state under <current directory>/.picho and runs builtin tools in the current directory. Set path.base to move logs, sessions, telemetry, caches, and default skills together; set path.executor only when the tool workspace should be different from the directory where picho chat starts.

Start it with:

uv run picho chat

If you prefer to generate a config template first, run:

uv run picho init

For the full explanation of fields such as path, builtin, tool_config.read.extensions, and executor, see picho/config.md.

2. Config + Python Runner

If you need to build config dynamically, inject custom logic before startup, or avoid storing the full config in a JSON file, you can create a Runner in Python and hand it to the CLI.

Example file my_runner.py:

import os

from picho.runner import Runner


config = {
    "agent": {
        "model": {
            "model_provider": "ark-responses",
            "model_name": "doubao-seed-2-0-lite-260215",
            "base_url": "https://ark.cn-beijing.volces.com/api/v3",
            "api_key": os.getenv("ARK_API_KEY"),
            "input_types": ["text", "image", "video"]
        },
        "instructions": "You are a helpful assistant.",
        "builtin": {
            "tool": ["read", "write", "bash", "edit"],
            "skill": ["code-review", "debug"]
        }
    },
    "session_manager": {
        "persist": true
    }
}

runner = Runner(config_type="dict", config=config)

Start it with:

uv run picho chat -r my_runner.py

-r accepts a Python file path, and that file must export a variable named runner.

Field definitions and configuration semantics are still documented in picho/config.md.

3. ACP Mode

If you want an editor, IDE, web UI, or agent orchestrator to drive picho through the Agent Client Protocol, start picho as an ACP server. The default transport is stdio:

uv run picho acp

You can also pass the same config or dynamic runner inputs used by picho chat:

uv run picho acp -c .picho/config.json
uv run picho acp -r my_runner.py

For browser-based ACP clients, start the WebSocket transport directly:

uv run picho acp --transport websocket --host 127.0.0.1 --port 3000

ACP mode exposes initialize, session/new, session/prompt, and session/cancel over newline-delimited JSON-RPC 2.0 on stdio or WebSocket. For details, see picho/acp/README.md.

Project Structure

The project can be understood from top to bottom as: entry layer -> execution layer -> tools and skills -> session and service wrappers.

picho/
├── picho/
│   ├── agent/          # Agent implementation and agent loop
│   ├── acp/            # Agent Client Protocol stdio adapter
│   ├── builtin/        # Built-in tools and built-in skills
│   ├── cli/            # picho init / picho chat / TUI
│   ├── observability/  # Observability and telemetry
│   ├── provider/       # Model provider abstractions
│   ├── runner/         # Runner, the primary orchestration entry point
│   ├── session/        # Session persistence, branching, compaction
│   ├── skills/         # Custom skill loading and formatting
│   ├── tool/           # Generic tool abstractions, executors, result handling
│   ├── utils/          # Utilities
│   ├── config.py       # Configuration model
│   └── config.md       # Configuration reference
├── tests/              # Tests
├── README.md
└── README_zh.md

Module responsibilities:

The relationship between builtin tools, skills, and built-in read can be summarized as follows:

  • builtin tool is the actual executable capability layer, such as read, write, edit, and bash.
  • Built-in read is the default first-class file reading path. It is suitable for directly reading text, images, audio, and, through extensions, PDF, DOCX, video, and more.
  • skill is closer to a task-level instruction template or workflow wrapper. It is suitable for code review, debugging, domain analysis, and more complex file-processing flows.
  • They are complementary rather than competing: content that can be read directly should go to read first; when a task requires specialized procedures, extra rules, domain knowledge, or multi-step orchestration, a skill is the better fit.
    • A more personal way to describe this distinction is: built-in read is like a pair of eyes, used to observe the things on Earth; a file-oriented skill is more like a telescope, something you pick up when you need to look at the stars or handle more distant and specialized targets. In our view, they should serve different layers of problems. They are not in conflict, and ordinary reading should not be offloaded to a skill by default, because that would be overkill.
  • read supports both extension and replacement: you can register new readers through agent.builtin.tool_config.read.extensions, and custom extensions are matched before the built-in readers. That means you can support new file types or replace the default .pdf and .docx pipelines.
  • Custom tools can be mounted through agent.tools by pointing to tool factory functions such as my_project.tools:create_tools. This keeps picho's built-in local tools separate from application-level tools.
  • skill is also extensible: besides the built-in skills, you can place your own skills under .picho/skills, or point path.skills to other directories.

The core directories listed above all have their own dedicated documentation. You can read each module on demand without having to work through the entire repository first.

Notes

The project is still in the early development stage. The provider layer now includes ark-responses, openai-completion, openai-responses, anthropic, and google, but the overall project is still evolving and should be evaluated carefully before production use.

Metadata

Release files for picho 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for picho 0.1.8
File Size Uploaded Provenance Actions
picho-0.1.8.tar.gz 253.9 kB Without provenance Details for picho-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for picho 0.1.8
File Interpreter ABI Platform Actions
picho-0.1.8-py3-none-any.whl Python 3 none any Details for picho-0.1.8-py3-none-any.whl

Total release size: 545.1 kB

Release files / picho-0.1.8.tar.gz

Download URL picho-0.1.8.tar.gz
Size 253.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c4927ad85f128de4ce3e79491b9cc4b77c008313d2f7fd0f99954196ceb9e0ca
BLAKE2b-256 checksum
How to use checksums
22ab0275051c34cd543dd9ac49a12323bba877b5b98ec86f1a2dd7ffc136dc0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / picho-0.1.8-py3-none-any.whl

Download URL picho-0.1.8-py3-none-any.whl
Size 291.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6f1158848f7746062c93340c4d3ab7d7131b084cce240f4f8b6bee22d283da8
BLAKE2b-256 checksum
How to use checksums
31049df71ae32bd9f47d7494151ebec0bc7eb1459e96a22c62a25276d039e4f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for picho 0.1.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page