ax-llm / ax

The unofficial DSPy framework. Build LLM powered Agents and "Agentic workflows" based on the Stanford DSP paper.
http://axllm.dev
Apache License 2.0
1.03k stars 68 forks source link

Calling agents that have functions #65

Open beddows opened 3 days ago

beddows commented 3 days ago

const agent1 = new AxAgent(ai, { name, description, signature, functions }); const agent2 = new AxAgent(ai, { name, description, signature, functions });

const agent = new AxAgent(ai, { name, description, signature, agents[agent1, agent2] });


It works if agent1 & agent2 don't have functions (like in the [agent](https://github.com/ax-llm/ax/blob/main/src/examples/agent.ts) example). But if they do, they don't work. Either it's a bug or I'm misunderstanding something fundamental to agents.

As for signatures, I'm using something like:
```typescript
signature1: agent1Request -> result "the result"
signature2: agent2Request -> result "the result"

signature: request -> result

Agent names and descriptions are detailed, distinct, and include proper parameters with the required property in their functions. Their functions return an empty result, since they're not called.

It works if I put all the functions in the main agent, but I'd rather use a modular approach to scale the function calling. This is with Anthropic.

dosco commented 1 day ago

can you try the latest release and confirm there were some fixes.