Skip to content

Add Discord agent gateway#264

Merged
michaelmwu merged 62 commits into
mainfrom
michaelmwu/tiered-reasoning-policy
May 14, 2026
Merged

Add Discord agent gateway#264
michaelmwu merged 62 commits into
mainfrom
michaelmwu/tiered-reasoning-policy

Conversation

@michaelmwu
Copy link
Copy Markdown
Member

@michaelmwu michaelmwu commented May 8, 2026

Description

Adds the first Discord agent gateway path: a thin /agent cog forwards natural-language task requests to backend API endpoints that parse, policy-check, audit, confirm, and execute supported inline task actions.
The shared five08.agent package defines request/plan/result models, deterministic tool manifests, capability policy, an inline task tool registry, model-tier routing with fallback support for OpenAI-compatible providers, and the initial task-command orchestrator.
Docs now cover the bot operating model, agent gateway flow, model-tier configuration, current pending-plan storage limits, and AGENT_API_TIMEOUT_SECONDS configuration.

Related Issue

Fixes #259
Related to #257
Follow-up context/memory design: #265

How Has This Been Tested?

  • ./scripts/format.sh
  • ./scripts/lint.sh
  • ./scripts/mypy.sh
  • uv run pytest tests/unit/test_agent_gateway.py tests/unit/test_backend_api.py tests/unit/test_worker_config.py -q
  • uv run pytest tests/unit/test_agent_gateway.py tests/unit/test_backend_api.py tests/unit/test_agent_cog.py -q
  • ./scripts/test.sh

Summary by CodeRabbit

  • New Features

    • /agent Discord command with interactive confirm/cancel flow, backend request + confirmation endpoints, synchronous gateway and single-use confirmation plans.
    • Tiered agent model selection (fast/strong/reasoning) with provider fallbacks, agent API timeout, and in-process task tooling for create/update/search actions.
    • Optional LLM tracing/observability via LANGFUSE base URL.
  • Documentation

    • Updated README/ENVIRONMENT with agent gateway, new env vars, timeout, fallback order, and updated default models to gpt-5-mini.
  • Tests

    • Expanded unit tests covering bot, gateway, orchestrator, tools, policy, and backend confirmation flows.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Discord agent gateway and natural-language command routing

2 participants