Commit Graph

111 Commits

Author SHA1 Message Date
Víctor Mayoral Vilches f2902cfcac Contribute CAI Fluency first bits
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-07-03 16:00:36 +02:00
Mery-Sanz 2c11ed9e1c add faq license 2025-06-18 08:28:34 +00:00
Víctor Mayoral Vilches 04359a07f3 Revert "Apply code formatting with make format" 2025-06-14 09:51:19 +00:00
Víctor Mayoral Vilches 7ec3f59db6 Update doc's index
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-06-03 06:58:40 +00:00
Víctor Mayoral Vilches 4926d91048 Update CAI's docs with case studies
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-06-03 06:58:27 +00:00
Víctor Mayoral Vilches 912ce4cb4d switch to .3 for 0.4.0 to avoid conflicts
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-05-26 10:58:49 +02:00
Víctor Mayoral Vilches 51abd1348e Add some bits to docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-05-14 14:44:23 +02:00
Mery-Sanz 9991b89af5 add tree 2025-05-14 13:40:25 +02:00
lidia9 3844dc57ae modifs 2025-05-14 13:37:20 +02:00
Mery-Sanz 9ecd81b4e9 update /load 2025-05-14 13:16:37 +02:00
Mery-Sanz b3458a3fa0 tree 2025-05-14 13:00:23 +02:00
lidia9 f4d83f1a15 modifs 2025-05-14 12:59:21 +02:00
Mery-Sanz 7690f9a942 add patterns 2025-05-14 12:37:39 +02:00
lidia9 bdb67e3faa modifs 2025-05-14 12:19:51 +02:00
Mery-Sanz 30f3b40e60 review doc 2025-05-14 12:14:33 +02:00
lidia9 465e9d3605 modif 2025-05-14 12:11:23 +02:00
Mery-Sanz a28dd413af Merge branch 'docs_new' of https://gitlab.com/aliasrobotics/alias_research/cai into docs_new 2025-05-14 12:06:17 +02:00
Mery-Sanz ea3cf8bcaf tools api 2025-05-14 12:06:08 +02:00
lidia9 007a989137 dev 2025-05-14 12:05:30 +02:00
lidia9 87538793d4 modifs 2025-05-14 11:59:02 +02:00
lidia9 00671adacd modifs 2025-05-14 11:56:27 +02:00
Mery-Sanz 38c0d3c9cc restructure 2025-05-14 11:25:55 +02:00
Mery-Sanz 97f67c88cd new brnach 2025-05-14 11:18:48 +02:00
Víctor Mayoral Vilches 56479c5a01 Add minor updates in docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-05-12 11:48:24 +02:00
Víctor Mayoral Vilches 5b29fbe4db Fix docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-04-02 16:48:23 +02:00
Víctor Mayoral Vilches d1fd6623e5 Merge remote-tracking branch 'origin/main' into cai 2025-03-31 13:21:34 +02:00
Eric Peter e891dfc314 Databricks MLflow tracing integration (#401) 2025-03-30 23:53:09 -04:00
Víctor Mayoral Vilches f0b93aec91 Fix paths in docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-28 08:35:25 +01:00
Víctor Mayoral Vilches f18e659ec8 Fix docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-28 07:55:41 +01:00
Ali Waleed 4c40fec70f Add Langtrace to `tracing.md` (#371) 2025-03-27 21:33:49 -04:00
Víctor Mayoral Vilches ac4797cec6 Re-structure under sdk/agents, get CLI mockup
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-27 14:31:38 +01:00
Rohan Mehta 1c8e9a55db Tracing screenshot for MCP docs (#355) 2025-03-26 10:56:34 -07:00
Víctor Mayoral Vilches adb358baae Update docs to integrate CAI, minor refinements
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-26 12:41:45 +01:00
Rohan Mehta 4c93a5d9b1 feat: Add Graphviz-based agent visualization functionality (#147)
This pull request introduces functionality for visualizing agent
structures using Graphviz. The changes include adding a new dependency,
implementing functions to generate and draw graphs, and adding tests for
these functions.

New functionality for visualizing agent structures:

* Added `graphviz` as a new dependency in `pyproject.toml`.
* Implemented functions in `src/agents/visualizations.py` to generate
and draw graphs for agents using Graphviz. These functions include
`get_main_graph`, `get_all_nodes`, `get_all_edges`, and `draw_graph`.

Testing the new visualization functionality:

* Added tests in `tests/test_visualizations.py` to verify the
correctness of the graph generation and drawing functions. The tests
cover `get_main_graph`, `get_all_nodes`, `get_all_edges`, and
`draw_graph`.

For example, given the following code:

```python
from agents import Agent, function_tool
from agents.visualizations import draw_graph


@function_tool
def get_weather(city: str) -> str:
    return f"The weather in {city} is sunny."


spanish_agent = Agent(
    name="Spanish agent",
    instructions="You only speak Spanish.",
)

english_agent = Agent(
    name="English agent",
    instructions="You only speak English",
)

triage_agent = Agent(
    name="Triage agent",
    instructions="Handoff to the appropriate agent based on the language of the request.",
    handoffs=[spanish_agent, english_agent],
    tools=[get_weather],
)


draw_graph(triage_agent)
```

Generates the following image:

<img width="614" alt="Screenshot 2025-03-13 at 18 36 23"
src="https://github.com/user-attachments/assets/d01fe502-6886-4efb-aaf8-c92e4524b0fe"
/>
2025-03-25 19:22:58 -04:00
Rohan Mehta db13026c0e Update visualization.md 2025-03-25 13:34:45 -04:00
Martín Bravo 8ba7b0932f Update installation instructions for visualization dependency to use 'viz' 2025-03-25 18:29:55 +01:00
Rohan Mehta 944b730da9 Make the reset behavior on tool use configurable
## Summary:

#263 added this behavior. The goal was to prevent infinite loops when tool choice was set. The key change I'm making is:
1. Making it configurable on the agent.
2. Doing bookkeeping in the Runner to track this, to prevent mutating agents.
3. Not resetting the global tool choice in RunConfig.

## Test Plan:
Unit tests.
.
2025-03-25 13:29:32 -04:00
Rohan Mehta a93ad02688 [4/n] Add docs for MCP
Just adding docs.
-
2025-03-25 13:25:50 -04:00
Martín Bravo 1ec5c2e233 Merge branch 'main' of https://github.com/openai/openai-agents-python into feat/draw_graph 2025-03-25 16:58:01 +01:00
Rohan Mehta 69907b8eed Fix potential infinite tool call loop by resetting tool_choice after … (#263)
# Fix potential infinite tool call loop by resetting tool_choice after
tool execution

## Summary

This PR fixes an issue where setting `tool_choice` to "required" or a
specific function name could cause models to get stuck in an infinite
tool call loop.

When `tool_choice` is set to force tool usage, this setting persists
across model invocations. This PR automatically resets `tool_choice` to
"auto" after tool execution, allowing the model to decide whether to
make additional tool calls in subsequent turns.

Unlike using `tool_use_behavior="stop_on_first_tool"`, this approach
lets the model continue processing tool results while preventing forced
repeated tool calls.

## Test plan

- Added tests to verify tool_choice reset behavior for both agent and
run_config settings
- Added integration test to verify the solution prevents infinite loops
- All tests pass

## Checks

- [x] I've added new tests for the fix
- [x] I've updated the relevant documentation (added comment in code)
- [x] I've run `make lint` and `make format`
- [x] I've made sure tests pass
2025-03-25 11:30:53 -04:00
Rohan Mehta 9f5ebd0e18 Update quickstart.md 2025-03-23 17:56:55 -04:00
xianghuijin b6ed16686b docs: Update tool_choice reset documentation to match implementation 2025-03-22 14:22:47 +08:00
Rohan Mehta 84e3c22645 Fix code examples in voice pipeline quickstart docs (#277) 2025-03-21 21:44:14 -04:00
Rohan Mehta 7af3f82a18 [docs] fix annotation numbering in context management (#293)
Fix inconsistent numbering between code and explanatory annotations in
the context management documentation.
2025-03-21 19:33:30 -04:00
Scott Condron 849aed4f3a Add Weights & Biases to tracing docs 2025-03-21 21:37:54 +00:00
Han Hwang Lim b2e04bef06 fix annotation numbering in context management
Fix inconsistent numbering between code and explanatory annotations in
the context management documentation.
2025-03-21 21:10:30 +00:00
James Hills 860eddd749 fix line in guardrails 2025-03-21 15:58:34 -04:00
Rohan Mehta caa3c6c856 docs: add Langfuse to tracing documentation (#284) 2025-03-21 10:31:05 -04:00
Jannik Maierhöfer d0e25ad1e3 docs: add Langfuse to tracing documentation 2025-03-21 13:39:17 +01:00
Pepijn a32dc7825c Fix voice pipeline code examples in quickstart docs 2025-03-21 06:47:12 +01:00