Project

octo-agent

0.0
There's a lot of open issues
Octo is a Ruby AI agent with three equal first-class interfaces: terminal CLI, web UI, and IM bridges (Feishu/WeCom/WeChat/Discord/Telegram). It speaks Anthropic Messages, OpenAI (Chat Completions + Responses), and AWS Bedrock natively, and provides autonomous tool use plus a Claude-Code-compatible skill format.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 2.1
>= 0.1.0
~> 3.4
>= 2.0, < 2.9
>= 1.4
~> 0.8
>= 3.14, < 5.0
~> 2.4.1
~> 1.3
~> 0.23
~> 1.8
~> 1.2
 Project Readme

octo-agent

Go CI Website Go License

English · 简体中文

A functionality-first AI agent, distributed as a single Go binary. Speaks two native API protocols — Anthropic Messages and OpenAI Chat Completions — and works against any compatible third party (DeepSeek, Kimi, Bailian, OpenRouter, vLLM, …). Aims for three equal interfaces: CLI, Web, and IM.

Status

Pre-1.0. CLI is functional today; Web UI and IM bridges land in later milestones — see dev-docs/go-rewrite-roadmap.md.

Install

Until tagged releases ship, build from source:

git clone https://github.com/Leihb/octo-agent.git
cd octo-agent
make build       # produces ./octo

Or install directly from Go:

go install github.com/Leihb/octo-agent/cmd/octo@latest

Quick start

export ANTHROPIC_API_KEY=sk-ant-...      # or OPENAI_API_KEY=...

# Single-shot
octo chat "Explain ring buffers in 100 words"

# Interactive REPL (multi-turn, session auto-saved)
octo chat

# Resume a previous session
octo chat --list-sessions
octo chat -c <session-id>

# Streaming on by default; turn off with --stream=false
octo chat --stream=false "..."

# OpenAI / DeepSeek / Bailian (OpenAI-compatible)
octo chat --provider openai --model gpt-4o-mini "..."

# Anthropic-compatible third parties (DeepSeek, Kimi, etc.)
ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic \
  octo chat --model deepseek-chat "..."

# Enable the terminal tool (LLM can run shell commands)
octo chat --tools

What's implemented

Milestone Status Description
M1 done Go scaffold (cmd/octo, Makefile, CI matrix Linux/macOS/Windows)
M1.2 done Anthropic Messages provider, single-turn octo chat
M2 done Streaming SSE, OpenAI Chat Completions provider, --provider flag
M3 done Interactive REPL, session persistence (~/.octo/sessions/), /cost, /save, /sessions
M4 done Tool calling (agentic loop), terminal tool
M5–M10 planned See dev-docs/go-rewrite-roadmap.md

Architecture

Layered, one-directional dependency graph:

cmd/octo/          CLI entry (chat, REPL, sessions, slash commands)
   ↓
internal/agent/    History, sessions, content blocks, Sender interface,
                   Agent.Turn / TurnStream / Run (tool-calling loop)
   ↓
internal/provider/ Provider interface + concrete implementations
                   ├─ anthropic/   x-api-key, system top-level, content[].text
                   └─ openai/      Bearer auth, system in messages[0]
   ↓
internal/tools/    ToolExecutor implementations (currently `terminal`)

Each provider implements both buffered (Send) and streaming (SendStream) variants. The agent layer mirrors with Sender / StreamingSender / ToolSender / ToolStreamingSender — interfaces are added incrementally so non-streaming providers still work.

Development

make build         # ./octo
make test          # go test -race ./...
make vet           # go vet ./...
make fmt-check     # gofmt -l . must be empty

See CLAUDE.md for the project guide intended for AI coding agents working in this repo, and CONTRIBUTING.md for the human PR workflow.

License

MIT. See LICENSE.txt.