Skip to content

Add 'How to Add an Agent' developer guide #25

@mingshl

Description

@mingshl

Originally created by @mingshl in mingshl/opensearch-agent-server#22

Description

Create a developer guide documenting how to add a new sub-agent to the server. This is critical for the ART team and any future contributors.

Content outline

  1. Create agent factory in src/agents/my_agent.py
  2. Define system prompt and tool selection
  3. Register in ag_ui_app.py lifespan
  4. Configure page context routing
  5. (Optional) Add custom MCP tool profile
  6. Add tests
  7. End-to-end verification

Include

  • Code examples for each step
  • Template agent file that can be copied
  • Explanation of the factory pattern and how orchestration works
  • How to test with a mock OpenSearch

Location

docs/adding-agents.md (linked from CONTRIBUTING.md)

References

  • Existing agents: src/agents/fallback_agent.py, src/agents/art_agent.py
  • Registration: src/server/ag_ui_app.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions