Skip to content

Document Registry integration differences between Manifold and Automata #45

@fogfish

Description

@fogfish

Problem: Registry is used differently in Manifold (automatic) vs Automata (manual), but this isn't documented.

Required Changes:

  1. Add section to README.md comparing registry usage
  2. Add code example showing Automata with registry
  3. Update registry.go godoc with usage examples
  4. Add comment in agent/manifold.go explaining automatic handling
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions