Coqui BotCoqui
PHP 8.4+ · MIT License

Your AI agent, in your terminal.

Multi-model orchestration, persistent sessions, and runtime extensibility via Composer. Powered by php-agents and any mix of locally hosted or cloud LLMs.

$curl -fsSL https://coquibot.ai/install | bash
coqui — Terminal
🐸 Coqui v0.1.0
Session a3f8b2c1
Model ollama/glm-4.7-flash:latest
Project ~/projects/my-app
You > Summarize the README and suggest improvements
Using: read_file(path: "README.md")
Done
Spawning: reviewer agent (openai/gpt-4o-mini)
Review complete

The README covers installation and basic usage well. Here are 3 suggestions:

1. Add a "Quick Start" section with a single command example

2. Include provider configuration examples

3. Add badges for PHP version and license

You >

Everything you need to build with AI

Coqui combines the power of multiple LLMs with persistent context, sandboxed execution, and extensible toolkits — all from your terminal.

Multi-Model Orchestration

Route tasks to the right model. Use cheap local models for orchestration, powerful cloud models for coding and review.

Persistent Sessions

SQLite-backed conversations that survive restarts. Resume where you left off with full context.

Runtime Extensibility

Install Composer packages at runtime and Coqui auto-discovers new toolkits on every boot.

Agent Delegation

Spawn specialized child agents — coder, reviewer — each using role-appropriate models for the task.

Workspace Sandboxing

All file I/O is sandboxed to a .workspace directory with its own Composer project, keeping your project safe.

Local-First

Runs with Ollama out of the box — no cloud required. Add OpenAI or Anthropic when you need more power.

HTTP API with SSE

Full REST API with real-time Server-Sent Events streaming. Build apps, dashboards, and integrations.

Skills System

Teach Coqui new behaviors with plain Markdown files. No code required — follows the AgentSkills specification.

Background Tasks

Run long-running agent work in separate processes. Monitor progress, cancel tasks, and check results anytime.

Audit Logging

Every tool execution decision — approved, denied, blocked — is logged to SQLite for full traceability.

Persistent Memory

Saves facts to MEMORY.md across sessions so Coqui remembers what matters. Context that persists 24/7.

Credential Management

Secure .env-based secret storage with automatic credential guards. Hot-reload — no restart needed.

Get started in seconds

The installer handles PHP, Composer, and dependencies automatically.

One-liner that installs PHP 8.4, Composer, and Coqui. Works on Ubuntu/Debian, macOS, Fedora, and Arch.

curl -fsSL https://coquibot.ai/install | bash

Works with your favorite providers

Use any combination of local and cloud models. Route each task to the right provider.

🦙OllamaLocal
🤖OpenAI
🧠Anthropic
+Any OpenAI-compatible API

Powerful tools, out of the box

Coqui ships with a rich set of tools the agent uses autonomously.

Custom Tools

spawn_agentDelegate tasks to specialized child agents
composerManage Composer dependencies at runtime
credentialsSecure credential management via .env
packagistSearch Packagist for packages
package_infoIntrospect installed packages
php_executeExecute PHP code in a sandboxed subprocess
restart_coquiTrigger a graceful restart from within a session
start_background_taskQueue long-running work in a background process
task_statusCheck progress, result, and events of a task
list_tasksList tasks with optional status filter
cancel_taskCancel a pending or running background task

Inherited Toolkits

from php-agents
FilesystemToolkitSandboxed read/write to the .workspace directory
ShellToolkitRun shell commands from project root
MemoryToolkitPersistent memory via MEMORY.md across sessions

Create your own toolkits with ToolkitInterface and Coqui auto-discovers them via Composer.

Build your own toolkit

Implement ToolkitInterface, publish to Packagist, and users get your tools with a single composer require.

Read the guide
final class MyToolkit implements ToolkitInterface
{
    public function tools(): array
    {
        return [
            new Tool(
                name: 'my_tool',
                description: 'Does something useful',
                parameters: [
                    new StringParameter(
                        'input',
                        'The input to process',
                        required: true,
                    ),
                ],
                callback: fn(array $args): ToolResult
                    => ToolResult::success($args['input']),
            ),
        ];
    }
}
REST + SSE

Build on the Coqui API

A full HTTP API with real-time streaming via Server-Sent Events. Build dashboards, mobile apps, CI pipelines, or anything that talks HTTP.

Key Endpoints

GET/api/healthServer liveness check
POST/api/sessionsCreate a new session
POST/api/sessions/{id}/messagesSend prompt (SSE stream)
GET/api/sessions/{id}/turnsList turns with metadata
POST/api/tasksStart a background task
GET/api/tasks/{id}/eventsSSE event stream for a task
GET/api/config/rolesList agent roles
POST/api/credentialsSet a credential

Start the server with coqui --api and connect from any language.

Quick Example

const res = await fetch(
  '/api/sessions/abc/messages',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      message: 'Analyze composer.json',
    }),
  }
);

// Stream the response
const reader = res.body
  .getReader();
AgentSkills Spec

Teach your agent new skills

Write a Markdown file. Coqui gains a new capability. No code, no plugins, no config. Skills follow the open AgentSkills specification.

# SKILL.md — Deploy to Production

## Trigger
When the user says "deploy" or "push to prod"

## Steps
1. Run the test suite with `composer test`
2. If tests pass, run `./deploy.sh`
3. Report the deployment URL

## Context
- Always confirm before deploying
- Log the git SHA that was deployed
Auto-Discovery

Place a SKILL.md anywhere in your project. Coqui finds and loads it automatically.

Progressive Disclosure

Skills are loaded on-demand by relevance, keeping the context window lean.

ClawHub Registry

Share and install community skills from the ClawHub registry with one command.

Skills documentation

What you can build

From solo dev workflows to team-wide automation, Coqui adapts to your needs.

Code Review & Auditing

Spawn reviewer agents to check PRs, enforce coding standards, and analyze code quality automatically.

Automated Testing

Run background tasks to execute test suites, capture errors, and report results — all while you keep working.

Dependency Management

Audit Composer packages, check for vulnerabilities, and keep dependencies up to date with the Packagist toolkit.

Documentation Generation

Agent reads your source code and generates accurate documentation with proper formatting.

DevOps Automation

Execute shell commands, manage Docker, run scripts, and automate infrastructure from your terminal.

Knowledge Management

Persistent memory across sessions. Coqui remembers your preferences, project context, and important facts.

Defense in Depth

Safety you can trust

Five layers of protection ensure your agent never runs destructive commands. The catastrophic blacklist cannot be disabled — even with --unsafe.

1

Workspace Sandbox

File I/O confined to .workspace/

2

Script Sanitizer

Static analysis blocks eval, exec, system

3

Catastrophic Blacklist

Hardcoded regex — always on, never bypassed

4

Approval Policy

Interactive confirm or auto-approve per tool

5

Audit Log

Every decision logged to SQLite

Docker Ready

Run anywhere with Docker

Full Docker support with compose overlays for development, testing, and production. Xdebug profiling and code coverage built in.

make runInteractive REPL
make devXdebug + path repos
make testRun test suite
make shellShell access
# compose.yaml
services:
  coqui:
    build: .
    volumes:
      - .:/app
      - workspace:/app/.workspace
    environment:
      - ANTHROPIC_API_KEY
      - OPENAI_API_KEY
      - OLLAMA_HOST=http://host.docker.internal:11434
    stdin_open: true
    tty: true

volumes:
  workspace:

Mobile app coming soon

A Flutter-based companion app to manage sessions, chat with your agents, and monitor background tasks from your phone. Built on the Coqui API.

In Development
🐸

Join the community

Follow along, ask questions, share toolkits, and help shape the future of Coqui.