https://github.com/g-eoj/guided-agents
Use structured output to control agents.
https://github.com/g-eoj/guided-agents
agents mlx vllm xgrammar
Last synced: 16 days ago
JSON representation
Use structured output to control agents.
- Host: GitHub
- URL: https://github.com/g-eoj/guided-agents
- Owner: g-eoj
- License: apache-2.0
- Created: 2025-03-03T15:32:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-25T23:28:30.000Z (10 months ago)
- Last Synced: 2025-10-27T00:48:56.175Z (7 months ago)
- Topics: agents, mlx, vllm, xgrammar
- Language: Python
- Homepage:
- Size: 505 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Guided Agents
This is a fork of the awesome [smolagents](https://github.com/huggingface/smolagents) library.
The goal of this fork is to integrate structured output.
## Why structured output?
### Reliable outputs
Instead of hoping one or few shot prompting will produce the desired output, structured output allows you to define a schema (or pretty much any structure) for the output.
This way, you can ensure that the output is always in a parsable format without prompt engineering time waste.
### Reduced token consumption
#### Control reasoning
Structured output opens up different strategies for limiting reasoning output.
This can make a difference with token hungry reasoning models while still maintaining good performance.
#### Short system prompts
Another advantage of not requiring one/few shot prompting is faster processing and reduced token consumption.
It is worth noting prompt caching has a similar effect.
## Where to start?
The is repo is a playground, and thus breaking changes are expected.
That said, please look at the [examples](https://github.com/g-eoj/guided-agents/blob/main/example/core.py) to get an idea of how these ideas come together.