Skip to content

louismorgner/tiny-oc

Repository files navigation

toc — tiny open company

CI

A local CLI tool for managing and spawning AI agent sessions from reusable templates.

Define agents as simple YAML configs, then spawn isolated sessions instantly. Built for engineers who want fast, reproducible agent workflows with a local-first control plane and pluggable runtimes.

Install

curl -fsSL https://raw.githubusercontent.com/louismorgner/tiny-oc/main/get-toc.sh | bash

Downloads the latest prebuilt binary for your platform. Supports macOS and Linux (amd64/arm64).

Current runtime implementation: Claude Code.

toc-native is now on the internal beta path. Its current beta scope includes local tools plus first-class public URL viewing via WebFetch. Authenticated integrations and browser automation are still out of scope. By default it uses OpenRouter, and you can override just the native runtime's API base URL with TOC_NATIVE_BASE_URL.

Build from source

git clone https://github.com/louismorgner/tiny-oc.git
cd toc
make build
./install.sh

Requires Go 1.25+.

Quick start

toc init                                      # initialize a workspace
toc agent create                              # create an agent interactively
toc agent spawn my-agent                      # spawn a session
toc agent spawn my-agent --resume <session-id>  # resume a session
toc status                                    # workspace overview

How it works

toc manages a .toc/ directory in your project root:

.toc/
  config.yaml            # workspace config
  sessions.yaml          # session history
  audit.log              # append-only audit log (JSON Lines)
  agents/
    pr-reviewer/
      oc-agent.yaml      # agent config
      agent.md           # agent instructions

When you run toc agent spawn, it:

  1. Copies the agent template to an isolated temp directory
  2. Lets the selected runtime provider prepare the session workspace
  3. Launches a runtime session with the configured model
  4. Syncs configured snapshot files back to the parent agent template in real-time (if configured)
  5. Tracks the session so you can resume it later

Documentation

  • Core concepts — canonical vocabulary for sessions, snapshots, permissions, and instructions
  • Getting started — install, create your first agent, spawn a session
  • Configuration reference — all config fields, snapshot sync patterns, audit log format
  • Runtimes — provider abstraction, Claude Code vs toc-native, hooks, model profiles
  • Pushing toc-native — use inspect mode to compare runtimes and tighten the native loop
  • toc-native Runtime — in-depth architecture, agent loop, tools, compaction, and current beta edges
  • Skills guide — create, install, and attach reusable capabilities
  • Integrations — API gateway, credential storage, permissions, built-in integrations
  • Architecture — project structure and design decisions

Commands

Command Description
toc init Initialize a workspace in the current directory
toc status Show workspace overview with agent validation
toc agent create Create a new agent interactively
toc agent list List all configured agents
toc agent spawn <name> Spawn a new agent session
toc agent spawn <name> --resume <id> Resume an existing session
toc agent spawn <name> --resume <id> --inspect Resume a session with API traffic capture
toc agent spawn <name> --inspect Capture full upstream API traffic for a session
toc agent remove <name> Remove an agent and its sessions
toc agent skills <name> Manage skills for an agent
toc skill create Create a new local skill
toc skill list List available skills
toc skill add <name-or-url> Install a skill from a Git URL or the registry
toc skill remove <name> Remove a skill
toc agent add <name> Install an agent template from the registry
toc registry search [query] Browse skills, agents, and workspaces
toc registry install <name> Install a skill, agent, or workspace from the registry
toc integrate add <name> Add an integration (GitHub, Slack)
toc integrate list List configured integrations
toc integrate test <name> Test an integration connection
toc integrate remove <name> Remove an integration
toc audit View the audit log
toc inspect [session-id] Inspect captured upstream API traffic for a session
toc inspect compare <a> <b> Compare captured API traffic across two sessions
toc question [session-id] Inspect pending detached session questions
toc answer <session-id> --text "..." Submit an answer for a pending detached question
toc config set <key> <value> Set workspace config or secrets
toc completion <shell> Generate shell completion script

Runtime commands (for agents during sessions)

Command Description
toc runtime list List agents available to spawn as sub-agents
toc runtime spawn <name> -p "..." Spawn a sub-agent in the background
toc runtime spawn <name> -p "..." --inspect Spawn a sub-agent with API traffic capture
toc runtime status [session-id] Check status of sub-agent sessions
toc runtime output <session-id> Read the output of a completed sub-agent
toc runtime invoke <integration> <action> Call an external API through the gateway
toc runtime watch <session-id> Live-tail a sub-agent's session
toc runtime replay <session-id> Replay session steps, tokens, and errors
toc runtime cancel <session-id> Cancel a running sub-agent

API inspection

Use --inspect on toc agent spawn or toc runtime spawn to route the session through a toc-managed local reverse proxy and capture full upstream HTTP request/response traffic.

Capture files are written to .toc/sessions/<session-id>/inspect/http.jsonl.

toc agent spawn reviewer --prompt "summarize the repo" --inspect
toc runtime spawn worker --prompt "fix the failing test" --inspect
toc inspect --last
toc inspect <session-id> --call 2 --body
toc inspect compare <claude-session> <native-session>

Roadmap

  • Agent creation and isolated session spawning via a runtime provider
  • Snapshot sync — persist selected session outputs back to agent templates
  • Audit log — append-only JSON Lines log for compliance and traceability
  • Skills — reusable, shareable agent capabilities
  • Registry — unified catalog of skills, agents, and workspaces with search and install
  • Sub-agents — agents that spawn and coordinate other agents
  • Integrations — API gateway with scoped permissions, credential vault, and rate limiting
  • Native runtime (beta) — built-in agent loop via OpenRouter with pluggable models
  • Session sandbox — unforgeable identity and permissions (#12)
  • Cost controls — per-agent and per-session spending limits
  • Git backing for .toc/ and agent sync
  • v1 release

Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages