Skip to content

Conversation

ehhuang
Copy link
Contributor

@ehhuang ehhuang commented Mar 4, 2025

Summary:

new Agent SDK API is added in llamastack/llama-stack-client-python#178

Update docs and test to reflect this.

Closes #1365

Test Plan:

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 4, 2025
ehhuang added a commit to llamastack/llama-stack-client-python that referenced this pull request Mar 6, 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
llamastack/llama-stack#1402
ehhuang added a commit to llamastack/llama-stack-client-python that referenced this pull request Mar 6, 2025
Summary:
otherwise errors on L127

Test Plan:
py.test -v -s --nbval-lax ./docs/getting_started.ipynb with
llamastack/llama-stack#1402
@ehhuang ehhuang marked this pull request as ready for review March 6, 2025 23:13
**common_params,
)
Server__AgentConfig(**agent_config)
Server__AgentConfig(**common_params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this crazy looking expression which is not getting assigned to anything

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha just asserting that it works without error. I'll deprecate tool_choice and remove these test.

@ehhuang ehhuang merged commit ca2910d into main Mar 6, 2025
7 checks passed
@ehhuang ehhuang deleted the pr1402 branch March 6, 2025 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Cleanup tooling passed to AgentConfig

3 participants