Skip to content

Design and implement basic tool system (registry, invocation, results) #15

@Aureliolo

Description

@Aureliolo

Context

Foundation for agent capabilities beyond text generation. The tool system allows agents to interact with external systems, files, and services. This issue covers the core architecture: defining tools, registering them, invoking them safely, and returning structured results.

Acceptance Criteria

  • Tool base class or Protocol with: name, description, parameters schema, execute method
  • Tool Registry with register, lookup, and list operations
  • Tool Invoker: matches LLM tool calls to registered tools, validates parameters, invokes execution
  • Structured Tool Result format: success/error flag, output data, metadata
  • Parameter schemas in LLM-compatible format (JSON Schema or OpenAI function calling format)
  • Example tool implemented (echo or calculator) demonstrating the full flow
  • Unit tests for registry, invocation, parameter validation, and result handling
  • Clear error handling for: tool not found, invalid parameters, execution failure

Technical Decisions

  • JSON Schema vs Pydantic for tool parameter definitions
  • Sync vs async tool execution (recommend async-first with sync wrapper)

Dependencies

None — this is the foundation for all tool work.

Design Spec Reference

Section 11.1, 11.2 — Tool System Architecture

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:criticalBlocks other work, must do firstscope:large3+ days of workspec:toolsDESIGN_SPEC Section 11 - Tool & Capability Systemtype:featureNew feature implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions