Skip to content

Connect Wiki Tools to Context Manager #10

@alirezamshi

Description

@alirezamshi

Description

Connect wiki search tools from src/knowledge/search to the context manager in src/execution/context_manager. For a given problem, the context manager should find related knowledge in the wiki/KG and provide it as context to the coding agent.

Current state:

  • KGEnrichedContextManager already accepts a KnowledgeSearch backend
  • It queries knowledge via knowledge_search.search(query, context)
  • Wiki tools in src/knowledge/search need to implement this interface

Goal

When a coding agent is working on a problem:

  1. Context manager receives the problem description
  2. Queries wiki/KG for related knowledge (Principles, Implementations, Heuristics, etc.)
  3. Returns relevant wiki content as additional context
  4. Agent uses this knowledge to generate better solutions

Integration Points

Context Manager (src/execution/context_manager/):

  • Already accepts a KnowledgeSearch backend
  • Queries knowledge via search(query, context) method

Wiki Search (src/knowledge/search/):

  • Needs to implement KnowledgeSearch interface
  • search(query, context) → returns relevant wiki pages
  • Should use the wiki indexer/retriever from issue Sync Wiki Changes to Local Files #3

Implementation Steps

  1. Ensure wiki indexer/retriever implements KnowledgeSearch base class
  2. Register wiki search as available backend in factory
  3. Configure context manager to use wiki search
  4. Format wiki page content for LLM consumption

What Knowledge to Retrieve

For a given problem, find:

  • Principles - Theoretical background relevant to the problem
  • Implementations - Code patterns and examples
  • Heuristics - Best practices and tips
  • Workflows - Similar processes that were documented
  • Artifacts - Data schemas and configs that might be needed

Deliverable

  1. Wiki search implementing KnowledgeSearch interface
  2. Integration with context manager
  3. Configuration to enable wiki-based knowledge enrichment

Test

  1. Index wiki pages from a repo (e.g., TRL)
  2. Run expert.build(goal="Fine-tune a language model")
  3. Verify context manager retrieves relevant wiki pages
  4. Verify agent receives wiki knowledge in its context

References

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Highest Priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions