Skip to content

feat: disable agents service by default using Docker profiles#506

Merged
Wirasm merged 2 commits intomainfrom
disable-agents-service
Aug 27, 2025
Merged

feat: disable agents service by default using Docker profiles#506
Wirasm merged 2 commits intomainfrom
disable-agents-service

Conversation

@Wirasm
Copy link
Copy Markdown
Collaborator

@Wirasm Wirasm commented Aug 27, 2025

Pull Request

Summary

Disables the archon-agents service by default to prevent startup issues while it's under development. The service can still be enabled when needed using Docker profiles.

Changes Made

  • Added 'agents' profile to archon-agents service in docker-compose.yml
  • Removed archon-agents as a dependency from archon-mcp service
  • Service now only starts when explicitly using --profile agents flag

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Affected Services

  • Frontend (React UI)
  • Server (FastAPI backend)
  • MCP Server (Model Context Protocol)
  • Agents (PydanticAI service)
  • Database (migrations/schema)
  • Docker/Infrastructure
  • Documentation site

Testing

  • All existing tests pass
  • Added new tests for new functionality
  • Manually tested affected user flows
  • Docker builds succeed for all services

Test Evidence

# Stopped all services
make stop
# ✓ Services stopped

# Started services without agents profile
docker compose up -d
# ✓ Only archon-server, archon-mcp, archon-ui started
# ✓ archon-agents did not start

# Verified services are healthy
docker ps --format "table {{.Names}}\t{{.Status}}" | grep archon
# archon-mcp       Up (healthy)
# archon-ui        Up (healthy)  
# archon-server    Up (healthy)

# Tested MCP health check
curl -s http://localhost:8181/api/mcp/health | jq .
# {"status": "healthy", "service": "mcp"}

# MCP tools working correctly
# health_check shows api_service=true, agents_service=false (correct)

Checklist

  • My code follows the service architecture patterns
  • If using an AI coding assistant, I used the CLAUDE.md rules
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass locally
  • My changes generate no new warnings
  • I have updated relevant documentation
  • I have verified no regressions in existing features

Breaking Changes

None - This change is backward compatible. The agents service can be re-enabled at any time using:

docker compose --profile agents up -d

Additional Notes

  • The agents service needs major updates before it's usable, so disabling it by default prevents confusion and startup errors
  • All core functionality (knowledge base, crawling, documents, MCP) continues to work without the agents service
  • The chat panel in the UI will show connection errors but won't crash the application
  • When the agents service is ready for use, it can be enabled without any code changes

Summary by CodeRabbit

  • Chores
    • Docker Compose now starts server, MCP, and frontend by default; agents are opt-in via the "agents" profile (use --profile agents).
    • archon-agents disabled by default and will only start with the agents profile.
    • MCP no longer waits for agents and can start independently.
    • New environment toggles: AGENTS_ENABLED (default false) on server and MCP, and AGENTS_SERVICE_URL on MCP to point to the agents endpoint.

- Add 'agents' profile to archon-agents service
- Remove archon-agents as dependency from archon-mcp service
- Service now only starts with --profile agents flag
- Prevents startup issues while agents service is under development
- All core functionality continues to work without agents

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 27, 2025

Walkthrough

The docker-compose configuration was updated to remove archon-mcp’s dependency on archon-agents and to gate archon-agents behind a new agents profile. By default, archon-agents no longer starts; it only starts when the agents profile is explicitly enabled. AGENTS_ENABLED and AGENTS_SERVICE_URL env vars were added.

Changes

Cohort / File(s) Summary
Compose orchestration
docker-compose.yml
Removed archon-agents from archon-mcp service depends_on. Added profiles: [agents] to archon-agents. Introduced AGENTS_ENABLED (default false) on archon-server and archon-mcp, and AGENTS_SERVICE_URL on archon-mcp (defaults to http://archon-agents:${ARCHON_AGENTS_PORT:-8052}).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant DC as docker-compose
  participant MCP as archon-mcp
  participant AG as archon-agents

  U->>DC: up
  DC->>MCP: Start archon-mcp
  Note over MCP: archon-mcp no longer depends_on archon-agents
  DC--xAG: archon-agents not started (no agents profile)
Loading
sequenceDiagram
  autonumber
  participant U as User
  participant DC as docker-compose
  participant MCP as archon-mcp
  participant AG as archon-agents

  U->>DC: up --profile agents
  DC->>MCP: Start archon-mcp
  DC->>AG: Start archon-agents (profile=agents)
  Note over AG: agents service started due to profile
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws: compose is clean,
Agents nap till flags convene.
MCP hops off, free to run,
Profiles bloom with rising sun.
Flip the switch—agents awake! 🥕🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 45df79d and ab56dd4.

📒 Files selected for processing (1)
  • docker-compose.yml (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docker-compose.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Backend Tests (Python + pytest)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch disable-agents-service

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docker-compose.yml (1)

1-9: Fix misleading profile docs at the top of the file

Comments still claim “all services start by default” and reference non-existent profiles (“backend”, “frontend”, “full”). With agents now gated behind an explicit profile, this is inaccurate and will confuse users.

Apply this diff to update the header:

-# Docker Compose Profiles Strategy:
-# - No profile: All services start by default when running 'docker compose up'
-# - "backend": Starts only backend services (server, mcp, agents) for hybrid development
-# - "frontend": Starts only the frontend UI service  
-# - "full": Starts all services for complete Docker deployment (same as no profile)
-# Use --profile flag to control which services start:
-#   docker compose up                      # All services (default behavior)
-#   docker compose --profile backend up    # Backend only for hybrid dev
-#   docker compose --profile full up       # Everything in Docker (same as default)
+# Docker Compose profiles:
+# - Default (no profile): Starts archon-server, archon-mcp, and archon-frontend.
+# - Agents are opt-in: archon-agents starts only with the "agents" profile.
+# Usage:
+#   docker compose up                        # Starts server, mcp, frontend (agents disabled)
+#   docker compose --profile agents up -d    # Also start archon-agents
🧹 Nitpick comments (1)
docker-compose.yml (1)

84-90: Gate agent usage via an explicit flag and make AGENTS_SERVICE_URL optional

archon-mcp sets AGENTS_SERVICE_URL to archon-agents even when the service isn’t running. If the MCP probes that URL on startup, you’ll see noisy connection errors. Recommend exposing an AGENTS_ENABLED toggle and allowing AGENTS_SERVICE_URL to be empty so the app can skip agent wiring cleanly.

Proposed change:

       - TRANSPORT=sse
       - LOG_LEVEL=${LOG_LEVEL:-INFO}
       # MCP needs to know where to find other services
-      - API_SERVICE_URL=http://archon-server:${ARCHON_SERVER_PORT:-8181}
-      - AGENTS_SERVICE_URL=http://archon-agents:${ARCHON_AGENTS_PORT:-8052}
+      - API_SERVICE_URL=http://archon-server:${ARCHON_SERVER_PORT:-8181}
+      - AGENTS_ENABLED=${AGENTS_ENABLED:-false}
+      - AGENTS_SERVICE_URL=${AGENTS_SERVICE_URL:-http://archon-agents:${ARCHON_AGENTS_PORT:-8052}}
       - ARCHON_MCP_PORT=${ARCHON_MCP_PORT:-8051}
       - ARCHON_SERVER_PORT=${ARCHON_SERVER_PORT:-8181}
       - ARCHON_AGENTS_PORT=${ARCHON_AGENTS_PORT:-8052}

Follow-up:

  • Ensure MCP ignores AGENTS_SERVICE_URL when AGENTS_ENABLED=false.
  • Optionally set AGENTS_ENABLED=true in a .env or an override compose file when using the agents profile.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ccdd1ec and 45df79d.

📒 Files selected for processing (1)
  • docker-compose.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Backend Tests (Python + pytest)
🔇 Additional comments (2)
docker-compose.yml (2)

92-94: Removal of depends_on for archon-agents looks good; confirm MCP’s startup doesn’t assume agents presence

This keeps agents opt-in. Just verify MCP doesn’t fail if agents come up later (e.g., running “docker compose up” then “docker compose --profile agents up -d”).


111-112: Good use of Compose profiles to gate archon-agents

profiles: [agents] correctly disables the service by default and enables it explicitly via --profile agents.

- Fix misleading profile documentation at top of docker-compose.yml
- Add AGENTS_ENABLED flag for cleaner agent service handling
- Make AGENTS_SERVICE_URL configurable via environment variable
- Prevent noisy connection errors when agents service isn't running

This provides a cleaner way to disable the agents service and allows
the application to skip agent wiring when AGENTS_ENABLED=false.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@Wirasm Wirasm merged commit 4a66f38 into main Aug 27, 2025
8 checks passed
@Wirasm Wirasm deleted the disable-agents-service branch August 27, 2025 10:37
POWERFULMOVES pushed a commit to POWERFULMOVES/PMOVES-Archon that referenced this pull request Feb 12, 2026
…ero (coleam00#506)

Bumps [prometheus-client](https://github.com/prometheus/client_python) from 0.20.0 to 0.24.1.
- [Release notes](https://github.com/prometheus/client_python/releases)
- [Commits](prometheus/client_python@v0.20.0...v0.24.1)

---
updated-dependencies:
- dependency-name: prometheus-client
  dependency-version: 0.24.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

1 participant