MCPcopy
hub / github.com/TinyAGI/tinyagi

github.com/TinyAGI/tinyagi @v0.0.20 sqlite

repository ↗ · DeepWiki ↗ · release v0.0.20 ↗
702 symbols 1,937 edges 135 files 13 documented · 2%
README

TinyAGI

TinyAGI 🦞

Multi-agent, Multi-team, Multi-channel, 24/7 AI assistant

Run multiple teams of AI agents that collaborate with each other simultaneously with isolated workspaces.

<img src="https://img.shields.io/badge/stability-experimental-orange.svg" alt="Experimental" />
<a href="https://opensource.org/licenses/MIT">
  <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License" />
</a>
<a href="https://discord.gg/jH6AcEChuD">
  <img src="https://img.shields.io/discord/1353722981163208785?logo=discord&logoColor=white&label=Discord&color=7289DA" alt="Discord" />
</a>
<a href="https://github.com/TinyAGI/tinyagi/releases/latest">
  <img src="https://img.shields.io/github/v/release/TinyAGI/tinyagi?label=Latest&color=green" alt="Latest Release" />
</a>

✨ Features

  • Multi-agent - Run multiple isolated AI agents with specialized roles
  • Multi-team collaboration - Agents hand off work to teammates via chain execution and fan-out
  • Multi-channel - Discord, WhatsApp, and Telegram
  • Web portal (TinyOffice) - Browser-based dashboard for chat, agents, teams, tasks, logs, and settings
  • Team chat rooms - Persistent async chat rooms per team with real-time CLI viewer
  • Multiple AI providers - Anthropic Claude, OpenAI Codex, and custom providers (any OpenAI/Anthropic-compatible endpoint)
  • Auth token management - Store API keys per provider, no separate CLI auth needed
  • Parallel processing - Agents process messages concurrently
  • Live TUI dashboard - Real-time team visualizer and chatroom viewer
  • Persistent sessions - Conversation context maintained across restarts
  • SQLite queue - Atomic transactions, retry logic, dead-letter management
  • Plugin system - Extend TinyAGI with custom plugins for message hooks and event listeners
  • 24/7 operation - Runs as a background process or Docker container

Community

Discord

We are actively looking for contributors. Please reach out.

🚀 Quick Start

Prerequisites

Installation & First Run

curl -fsSL https://raw.githubusercontent.com/TinyAGI/tinyagi/main/scripts/install.sh | bash

This downloads and installs the tinyagi command globally. Then just run:

tinyagi

That's it. TinyAGI auto-creates default settings, starts the daemon, and opens TinyOffice in your browser. No wizard, no configuration needed.

  • Default workspace: ~/tinyagi-workspace
  • Default agent: tinyagi (Anthropic/Opus)
  • Channels: none initially — add later with tinyagi channel setup

Development (run from source repo)

git clone https://github.com/TinyAGI/tinyagi.git
cd tinyagi && npm install && npm run build
npx tinyagi start
npx tinyagi agent list

Other installation methods

From Source:

git clone https://github.com/TinyAGI/tinyagi.git
cd tinyagi && npm install && ./scripts/install.sh

🐳 Docker

docker compose up -d

Set your API key in a .env file or pass it directly:

ANTHROPIC_API_KEY=sk-ant-... docker compose up -d

The API runs on http://localhost:3777. Data is persisted in a tinyagi-data Docker volume.

📱 Channel Setup Guides

Discord Setup

  1. Go to Discord Developer Portal
  2. Create application → Bot section → Create bot
  3. Copy bot token
  4. Enable "Message Content Intent"
  5. Invite bot using OAuth2 URL Generator

Telegram Setup

  1. Open Telegram → Search @BotFather
  2. Send /newbot → Follow prompts
  3. Copy bot token
  4. Start chat with your bot

WhatsApp Setup

After starting TinyAGI, scan the QR code:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     WhatsApp QR Code
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[QR CODE HERE]

📱 Settings → Linked Devices → Link a Device

🌐 TinyOffice Web Portal

TinyAGI includes a web portal for managing your agents, teams, tasks, and chat — all from the browser.

TinyOffice Office View

Once you start running TinyAGI locally, you can control it by visiting office.tinyagicompany.com. It connects to your local TinyAGI API at localhost:3777 — no account or sign-up needed.

Alternatively, you can run TinyOffice locally:

tinyagi office  # Builds and starts on http://localhost:3000

TinyOffice Features & Setup

  • Dashboard - Real-time queue/system overview and live event feed
  • Chat Console - Send messages to default agent, @agent, or @team
  • Agents & Teams - Create, edit, and remove agents/teams
  • Tasks (Kanban) - Create tasks, drag across stages, assign to agent/team
  • Logs & Events - Inspect queue logs and streaming events
  • Settings - Edit TinyAGI configuration (settings.json) via UI
  • Office View - Visual simulation of agent interactions
  • Org Chart - Hierarchical visualization of teams and agents
  • Chat Rooms - Slack-style persistent chat rooms per team
  • Projects - Project-level task management with filtered kanban boards

Running Locally

Start TinyAGI first (API default: http://localhost:3777), then:

tinyagi office

This auto-detects when dependencies or builds are needed (e.g. after tinyagi update) and starts the production server on http://localhost:3000.

For development with hot-reload:

cd tinyoffice
npm install
npm run dev

If TinyAGI API is on a different host/port, set:

cd tinyoffice
echo 'NEXT_PUBLIC_API_URL=http://localhost:3777' > .env.local

📋 Commands

Commands work with the tinyagi CLI.

Core Commands

Command Description Example
(no command) Install, configure defaults, start, and open TinyOffice tinyagi
start Start TinyAGI daemon tinyagi start
stop Stop all processes tinyagi stop
restart Restart TinyAGI tinyagi restart
status Show current status and activity tinyagi status
channel setup Configure channels interactively tinyagi channel setup
logs [type] View logs (discord/telegram/whatsapp/queue/heartbeat/all) tinyagi logs queue

Agent Commands

Command Description Example
agent list List all configured agents tinyagi agent list
agent add Add new agent (interactive) tinyagi agent add
agent show <id> Show agent configuration tinyagi agent show coder
agent remove <id> Remove an agent tinyagi agent remove coder
agent reset <id> Reset agent conversation tinyagi agent reset coder
agent provider <id> [provider] Show or set agent's AI provider tinyagi agent provider coder anthropic
`agent provider

--model | Set agent's provider and model |tinyagi agent provider coder openai --model gpt-5.3-codex` |

Team Commands

Command Description Example
team list List all configured teams tinyagi team list
team add Add new team (interactive) tinyagi team add
team show <id> Show team configuration tinyagi team show dev
team remove <id> Remove a team tinyagi team remove dev
team add-agent <t> <a> Add an existing agent to a team tinyagi team add-agent dev reviewer
team remove-agent <t> <a> Remove an agent from a team tinyagi team remove-agent dev reviewer
team visualize [id] Live TUI dashboard for team chains tinyagi team visualize dev

Chatroom Commands

Command Description Example
chatroom <team> Real-time TUI viewer with type-to-send tinyagi chatroom dev
office Start TinyOffice web portal on port 3000 tinyagi office

Every team has a persistent chat room. Agents post to it using [#team_id: message] tags, and messages are broadcast to all teammates. The chatroom viewer polls for new messages in real time — type a message and press Enter to post, or press q/Esc to quit.

API endpoints:

GET  /api/chatroom/:teamId          # Get messages (?limit=100&since=0)
POST /api/chatroom/:teamId          # Post a message (body: { "message": "..." })

Provider & Custom Provider Commands

Command Description Example
provider [name] Show or switch global AI provider tinyagi provider anthropic
provider <name> --model <model> Switch provider and model; propagates to matching agents tinyagi provider openai --model gpt-5.3-codex
provider <name> --oauth-token <token> Store OAuth token for a built-in provider tinyagi provider anthropic --oauth-token sk-ant-oat01-...
provider list List all custom providers tinyagi provider list
provider add Add a new custom provider (interactive) tinyagi provider add
provider remove <id> Remove a custom provider tinyagi provider remove proxy
model [name] Show or switch AI model tinyagi model opus

Custom provider details

Custom providers let you use any OpenAI or Anthropic-compatible API endpoint (e.g., OpenRouter, proxy servers, self-hosted models).

Define a custom provider in settings.json:

{
  "custom_providers": {
    "my-proxy": {
      "name": "My Proxy",
      "harness": "claude",
      "base_url": "https://proxy.example.com/v1",
      "api_key": "sk-...",
      "model": "claude-sonnet-4-6"
    }
  }
}
Field Required Description
name Yes Human-readable display name
harness Yes CLI to use: claude or codex
base_url Yes API endpoint URL
api_key Yes API key for authentication
model No Default model name for CLI

Assign a custom provider to an agent:

tinyagi agent provider coder custom:my-proxy
tinyagi agent provider coder custom:my-proxy --model gpt-4o

Auth token storage — store credentials for built-in providers so you don't need separate CLI auth:

tinyagi provider anthropic --oauth-token sk-ant-oat01-...
tinyagi provider anthropic --api-key sk-ant-...
tinyagi provider openai --api-key sk-...

Anthropic supports both oauth_token (exported as CLAUDE_CODE_OAUTH_TOKEN) and api_key (exported as ANTHROPIC_API_KEY). OAuth takes priority if both are set. OpenAI keys are saved as models.openai.api_key and exported as OPENAI_API_KEY. If nothing is configured, the process inherits environment variables directly.

API endpoints:

GET    /api/custom-providers              # List custom providers
PUT    /api/custom-providers/:id          # Create or update
DELETE /api/custom-providers/:id          # Delete

See [docs/AGENTS.md](docs/AGENT

Extension points exported contracts — how you extend this code

PairingPendingEntry (Interface)
(no doc)
packages/core/src/pairing.ts
ProviderOption (Interface)
(no doc)
packages/cli/src/shared.ts
PendingMessage (Interface)
(no doc)
packages/channels/src/telegram.ts
Task (Interface)
(no doc)
packages/server/src/routes/tasks.ts
TeamConfig (Interface)
(no doc)
packages/visualizer/src/team-visualizer.tsx
BracketTag (Interface)
(no doc)
packages/teams/src/routing.ts
TaskFormData (Interface)
(no doc)
tinyoffice/src/components/task/task-form.tsx
PairingApprovedEntry (Interface)
(no doc)
packages/core/src/pairing.ts

Core symbols most depended-on inside this repo

cn
called by 121
tinyoffice/src/lib/utils.ts
log
called by 106
packages/core/src/plugins.ts
log
called by 103
packages/core/src/logging.ts
on
called by 66
packages/core/src/plugins.ts
apiFetch
called by 52
tinyoffice/src/lib/api.ts
usePolling
called by 44
tinyoffice/src/lib/hooks.ts
getSettings
called by 34
packages/core/src/config.ts
log
called by 33
packages/channels/src/whatsapp.ts

Shape

Function 612
Interface 84
Method 6

Languages

TypeScript100%

Modules by API surface

tinyoffice/src/lib/api.ts75 symbols
tinyoffice/src/app/control/page.tsx29 symbols
packages/core/src/queues.ts27 symbols
tinyoffice/src/components/ui/kanban.tsx26 symbols
tinyoffice/src/components/office/pixel-office-scene.tsx21 symbols
packages/core/src/plugins.ts20 symbols
packages/visualizer/src/team-visualizer.tsx19 symbols
tinyoffice/src/components/ui/dropdown-menu.tsx15 symbols
packages/cli/src/shared.ts15 symbols
packages/channels/src/telegram.ts15 symbols
packages/core/src/pairing.ts14 symbols
tinyoffice/src/components/office/types.ts12 symbols

Dependencies from manifests, versioned

@clack/prompts1.1.0 · 1×
@dnd-kit/core6.3.1 · 1×
@dnd-kit/modifiers9.0.0 · 1×
@dnd-kit/sortable10.0.0 · 1×
@dnd-kit/utilities3.2.2 · 1×
@hono/node-server1.19.9 · 1×
@radix-ui/react-separator1.1.8 · 1×
@tailwindcss/typography0.5.19 · 1×
@tinyagi/core* · 1×
@tinyagi/server* · 1×
@tinyagi/teams* · 1×

For agents

$ claude mcp add tinyagi \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact