翻訳待ち:Show HN: Agent Office (Slack for AI Agents) – Similar to Grok Bot but older
AI サービスが一時的に利用できないため、復旧後に翻訳を補完します。ソース概要:Notifications You must be signed in to change notification settings Fork 0 Star 0 BranchesTags Open more actions menu Latest commit History 177 Commits 177 Commits Folders and files NameName Last commit message Last com…
AI サービスが一時的に利用できないため、復旧後に翻訳を補完します。
Notifications You must be signed in to change notification settings Fork 0 Star 0 BranchesTags Open more actions menu Latest commit History 177 Commits 177 Commits Folders and files NameName Last commit message Last commit date docs/images docs/images examples examples src src test test ui ui .DS_Store .DS_Store .env.example .env.example .gitignore .gitignore .prettierignore .prettierignore .prettierrc .prettierrc README.md README.md eslint.config.js eslint.config.js package.json package.json pnpm-lock.yaml pnpm-lock.yaml tsconfig.json tsconfig.json Repository files navigation Multi-agent workspace manager built on Pi. Orchestrates AI coding agents — similar to Claude Code or OpenClaw — with tick-based scheduling, priority queues, inbox IPC, cross-agent file access, watchdog monitoring, proactive cron jobs, optional Docker sandbox isolation, and declarative YAML configuration. agent-office.mp4 Get Started Try one of these examples to get up and running quickly. Set env vars in the project root .env (not inside Docker — the host forwards them to containers). Basic team — PM, coder, and reviewer (uses GitHub Copilot OAuth, no API keys): pnpm install cp -r examples/basic-team/ ~/.agent-office/offices/basic-team/ pnpm dev oauth login github-copilot --office basic-team pnpm dev start --office basic-team --sandbox docker OpenServ team — idea scout, team lead, agent dev, and token launcher: pnpm install cp .env.example .env mkdir -p ~/.agent-office/offices/openserv-team cp examples/openserv-team/office.yaml ~/.agent-office/offices/openserv-team/office.yaml pnpm dev start --office openserv-team --sandbox docker OPENAI_API_KEY= WALLET_PRIVATE_KEY= # EVM wallet key for openserv-labs/skills agents Feature team — task-driven development with Kanban board: cp -r examples/feature-team/ ~/.agent-office/offices/feature-team/ pnpm dev start --office feature-team See examples/ for more details — each has a README describing the setup. Table of Contents Architecture Quick Start OAuth Authentication Supported Providers CLI Commands Using OAuth in office.yaml Web UI Auth Selector Multi-Office Architecture Creating an Office Office Configuration Heartbeat Permissions Tool Policy Hierarchy Auto-Sync Reload Cron Jobs Office-Level Cron Agent Cron Tools Task Management Migration from agents.yaml Sandbox Modes In-Process Mode Docker Sandbox Mode Commands Hire Options CLI Flags Execution Surfaces REST API Endpoints Agent Tools list_agents message_agent message_user post_channel read_agent_file authenticated_fetch cron_add cron_remove cron_list read_skill skill_search skill_install skill_remove skill_create task_create task_update task_list task_get task_delete Tool Architecture Prompt System Concepts Tick-Based Scheduler Priority Levels Workspace Sandboxing Skills Watchdog Message Persistence Prompt Inspection Cost Tracking Web UI End-to-End Examples Project Structure Dependencies Development Architecture graph TD YAML[office.yaml] --> WS CLI[CLI + Web UI] --> WS[Workspace] WS --> SCH[Scheduler\ntick loop] WS --> BUS[MessageBus\ninboxes] WS --> WD[Watchdog\nheartbeat] WS --> CRON[CronService\nscheduled jobs] WS --> TS[TaskService\nKanban board] WS -->|in-process| A[Agent A\nPi · tools · skills] WS -->|in-process| B[Agent B\nPi · tools · skills] WS -->|Docker sandbox| HA[Host API\nHTTP :13000] HA |HTTP| SA[Sandbox A\nDocker · Pi · proxy tools] HA |HTTP| SB[Sandbox B\nDocker · Pi · proxy tools] BUS --> A BUS --> B BUS --> HA Loading Core flow: office.yaml (auto-spawn) / CLI / Web UI / Cron / Agent cron tools / Task notifications -> Workspace -> Scheduler tick -> drain inbox -> dispatch to Pi Agent -> agent runs tools -> response streamed to UI. Each agent is a full Pi coding agent with its own filesystem workspace, skills, and injected tools (message_user, post_channel, message_agent, list_agents, read_agent_file, authenticated_fetch, cron_add, cron_remove, cron_list, task_create, task_update, task_list, task_get, task_delete, read_skill, skill_search, skill_install, skill_remove, skill_create). The scheduler runs a tick loop that serves agents by priority, one message per tick per agent, non-blocking. Agents can run in-process (default) or inside Docker containers for full process-level isolation. Quick Start pnpm install # Configure .env cp .env.example .env # then fill in your keys # Create an office pnpm dev office create my-team # Start (Web UI auto-starts) pnpm dev start --office my-team # Start with Docker sandbox isolation pnpm dev start --office my-team --sandbox docker Create a .env file with your provider API keys. Each model requires its corresponding provider key: # Model API Keys (required for agents using these models) OPENAI_API_KEY=sk-... # For OpenAI models (gpt-4o, etc.) ANTHROPIC_API_KEY=sk-... # For Anthropic models (Claude, etc.) GEMINI_API_KEY=... # For Google Gemini models XAI_API_KEY=... # For xAI Grok models # Optional: Custom secret refs for office.yaml agents # MY_GH_TOKEN=ghp_... # Host env vars for authenticated_fetch secrets Authentication: Each model needs credentials. You can use either API keys (.env) or OAuth: API keys — set in .env (e.g. OPENAI_API_KEY=sk-...). Required when the model's provider has no OAuth credentials. OAuth — authenticate via provider CLIs before starting. OAuth tokens auto-refresh and don't require .env keys. # Option A: API keys in .env echo "ANTHROPIC_API_KEY=sk-..." >> .env # Option B: OAuth login (requires provider CLI installed) pnpm dev oauth login anthropic --office my-team pnpm dev oauth list --office my-team When both OAuth credentials and an API key exist for a provider, you can switch between them per-agent in the Web UI. See OAuth Authentication for details. See the Dynamic Model Discovery section below for how to browse available models and their requirements in the Web UI. OAuth Authentication As an alternative to API keys in .env, agents can authenticate with model providers via OAuth. This uses the provider's own CLI login flow — the agent-office CLI orchestrates the browser-based OAuth handshake and stores credentials per office. Supported Providers Provider ID Name Flow Type Requires anthropic Anthropic Code paste Anthropic CLI openai-codex OpenAI Callback server OpenAI Codex CLI github-copilot GitHub Copilot Code paste GitHub Copilot CLI google-gemini-cli Google Gemini CLI Callback server Gemini CLI google-antigravity Antigravity Callback server Antigravity CLI Code paste providers open a browser URL and prompt you to paste back an auth code. Callback server providers start a local HTTP server and complete the flow automatically. CLI Commands # Login — interactive OAuth flow (opens browser) pnpm dev oauth login --office # List — show all providers and credential status pnpm dev oauth list --office # Logout — remove stored credentials pnpm dev oauth logout --office Example session: $ pnpm dev oauth login anthropic --office my-team [oauth] Logging in to Anthropic... [oauth] Open this URL to authenticate: https://console.anthropic.com/oauth/... Paste the authorization code: **** [oauth] Credentials saved for Anthropic. $ pnpm dev oauth list --office my-team ✓ anthropic Anthropic ✗ openai-codex OpenAI ✗ github-copilot GitHub Copilot ✗ google-gemini-cli Google Gemini CLI ✗ google-antigravity Antigravity Login: pnpm dev oauth login --office my-team Logout: pnpm dev oauth logout --office my-team Credentials are stored at ~/.agent-office/offices//oauth/.json and auto-refresh when tokens expire. Using OAuth in office.yaml Set the auth field on an agent to use OAuth instead of an API key: agents: designer: model: anthropic:claude-sonnet-4-20250514 auth: "oauth:anthropic" # use OAuth credentials reviewer: model: openai:gpt-4o auth: "oauth:openai-codex" # use OAuth credentials analyst: model: google:gemini-2.0-flash # no auth field — falls back to GEMINI_API_KEY from .env The auth field format is oauth:. When set, the agent uses stored OAuth credentials with automatic token refresh instead of a static API key. Web UI Auth Selector When OAuth credentials exist for an agent's model provider, the Web UI Config tab shows an Auth selector to switch between "API Key" and "OAuth" modes. The UI also displays all authenticated providers as green badges with one-click removal. The auth selector only appears when credentials are available — if no OAuth login has been done for a provider, agents use API keys by default. OAuth REST API Method Path Description GET /api/oauth/providers List all providers with authentication status GET /api/oauth/status/:id Check if credentials exist for a provider DELETE /api/oauth/:id Remove stored credentials for a provider Multi-Office Architecture Each office represents a company or team with shared identity, env vars, and secrets. Offices live under ~/.agent-office/offices//. Creating an Office # Create with default display name (same as id) pnpm dev office create acme # Create with a custom display name pnpm dev office create acme --name "Acme Corp" Office IDs must be path-safe: lowercase letters, digits, hyphens, underscores (matching [a-z0-9][a-z0-9_-]*). The display name (office.name in YAML) is free-form. Office Configuration (office.yaml) Define your office once in ~/.agent-office/offices//office.yaml and agents auto-spawn on startup. # ~/.agent-office/offices/acme/office.yaml office: name: Acme Corp description: "We build AI-powered widgets" env: SHARED_API_URL: https://api.acme.com secrets: SHARED_TOKEN: ${ACME_TOKEN} cron: standup: schedule: "0 9 * * 1-5" report_channel: general tasks: - title: "Daily standup" assignee: pm agents: designer: model: anthropic:claude-sonnet-4-20250514 priority: normal # idle | low | normal | high | critical (or 0-4) thinking: low # off | minimal | low | medium | high | xhigh description: "Frontend designer — builds HTML/CSS" prompt_inline: | You are a frontend designer specializing in responsive layouts. Focus on clean, semantic HTML and modern CSS. skills: - nichochar/web-skills auth: "oauth:anthropic" # optional — use OAuth instead of API key api_key_ref: MY_CUSTOM_KEY # optional — host env var name for model key override env: # non-sensitive, passed as Docker --env (agent overrides office) LOG_LEVEL: debug WORKSPACE_NAME: designer secrets: # sensitive, ${VAR} refs only — delivered via authenticated_fetch GITHUB_TOKEN: ${MY_GH_TOKEN} disclose_secrets: true # show secret names in system prompt (default: false) permissions: office_cron: true # allow managing office-level cron jobs reviewer: model: openai:gpt-4.1 priority: high thinking: medium description: "Code reviewer" Office-level env and secrets are inherited by all agents. Agent-level values override office-level. All agent fields are optional. Agents are spawned sequentially in declaration order; if one fails, the rest still start. Model availability depends on your provider account — replace the model value with your preferred provider:model-id if the default is unavailable. Field Type Default Description model string anthropic:claude-sonnet-4-20250514 provider:model-id priority string | number normal Priority name or 0-4 thinking string low off / minimal / low / medium / high / xhigh description string "" Visible to other agents prompt_inline string (none) Custom instructions (inline text, appended to base prompt) cwd string ~/.agent-office/offices//agents//workspace Working directory skills string[] [] GitHub sources to auto-install (owner/repo) auth string (none — uses API key) Auth mode: oauth: for OAuth (see OAuth) api_key_ref string (auto from provider) Host env var name for model API key env map {} Non-sensitive env vars (Docker --env, supports ${VAR} refs) secrets map {} Secret refs in [truncated for AI cost control]