Skip to content

feat: new Agent API #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged

feat: new Agent API #178

merged 1 commit into from
Mar 6, 2025

Conversation

ehhuang
Copy link
Contributor

@ehhuang ehhuang commented Mar 4, 2025

Summary:

This PR simplifies the Agent SDK (related to #160)

Before

agent_config = AgentConfig(models, instructions, toolgroups, client_tools, ...)
agent = Agent(client, agent_config, client_tools)

Now just:

agent = Agent(client, model, instructions, tools, ...)

See https://github.com/meta-llama/llama-stack-apps/pull/200/files for example.

Will update all examples and docs once this PR looks good.

Test Plan:

Run test_agents.py with
meta-llama/llama-stack#1402

ehhuang added a commit that referenced this pull request Mar 6, 2025
Summary:

Test Plan:
Before
<img width="1189" alt="image"
src="https://github.com/user-attachments/assets/b92b321e-3b89-4b17-8459-1b449dc8c087"
/>
After
<img width="1279" alt="image"
src="https://github.com/user-attachments/assets/eaa0b09a-bf29-43e7-a8c0-abcd7f87e8df"
/>


---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/meta-llama/llama-stack-client-python/pull/177).
* #178
* __->__ #177
Summary:

Test Plan:
@ehhuang ehhuang merged commit c2f73b1 into main Mar 6, 2025
3 checks passed
@ehhuang ehhuang deleted the pr178 branch March 6, 2025 20:40
ehhuang added a commit to meta-llama/llama-stack that referenced this pull request Mar 6, 2025
# Summary:
new Agent SDK API is added in
meta-llama/llama-stack-client-python#178

Update docs and test to reflect this.

Closes #1365

# Test Plan:
```bash
py.test -v -s --nbval-lax ./docs/getting_started.ipynb

LLAMA_STACK_CONFIG=fireworks \
   pytest -s -v tests/integration/agents/test_agents.py \
  --safety-shield meta-llama/Llama-Guard-3-8B --text-model meta-llama/Llama-3.1-8B-Instruct
```
@ehhuang ehhuang mentioned this pull request Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants