Problem: Registry is used differently in Manifold (automatic) vs Automata (manual), but this isn't documented.
Required Changes:
- Add section to README.md comparing registry usage
- Add code example showing Automata with registry
- Update
registry.go godoc with usage examples
- Add comment in
agent/manifold.go explaining automatic handling
- Add comment in
agent/automata.go explaining decoder responsibility
Content to Add (README.md):
### Registry Integration Patterns
The Registry interface is integrated differently depending on the agent type:
**Manifold** - Automatic tool handling:
```go
registry := command.NewRegistry()
registry.Attach("calc", calculatorServer)
agent := agent.NewManifold(llm, encoder, decoder, registry)
// Registry is automatically called when LLM requests tools
Automata - Manual decoder handling:
func (a *MyAgent) Decode(reply *chatter.Reply) (float64, Result, error) {
// Decoder must check for tool invocations
if reply.Stage == chatter.LLM_INVOKE {
// Handle tool calls manually
phase, msg, err := a.registry.Invoke(reply)
// ... process results
}
// ... decode normal responses
}
See examples/03_context (Manifold) and create new example for Automata pattern.
Estimated Effort: 1.5 hours
Skills Required: Technical writing, understanding of both agent types
Problem: Registry is used differently in Manifold (automatic) vs Automata (manual), but this isn't documented.
Required Changes:
registry.gogodoc with usage examplesagent/manifold.goexplaining automatic handlingagent/automata.goexplaining decoder responsibilityContent to Add (README.md):
Automata - Manual decoder handling:
See
examples/03_context(Manifold) and create new example for Automata pattern.Estimated Effort: 1.5 hours
Skills Required: Technical writing, understanding of both agent types