Commit Graph

1078 Commits

Author SHA1 Message Date
Martín Bravo 3521ab0e48 feat: add documentation for agent visualization using Graphviz 2025-03-18 09:55:23 +01:00
Martín Bravo cd96e745df refactor: move graphviz dependency to visualization section 2025-03-18 09:53:53 +01:00
Martín Bravo c7805669bc feat: add visualization functions for agent graphs 2025-03-18 09:53:48 +01:00
B-Step62 aeb6917e17 [doc] add mlflow tracing integration
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
2025-03-18 11:29:21 +09:00
Akshay Deo 5b86a4eadc chore: adds Maxim AI to tracing processors 2025-03-18 07:49:33 +05:30
Martín Bravo dba2d4bd23 Merge branch 'main' of https://github.com/openai/openai-agents-python into feat/draw_graph 2025-03-17 23:50:52 +01:00
Dmitry Pimenov 87fb4ee6bc Docs: update readme text to clarify handoffs (#208)
Clarifying that the handoff abstraction is implemented via Responses
tool calling
2025-03-17 15:15:13 -07:00
Dmitry Pimenov e2be8cc604 clarifying that handoffs are a type of tool call under the hood 2025-03-17 15:05:15 -07:00
Rohan Mehta 801cddc28a Stronger tracing tests with `inline-snapshot` (#25)
`assert len(spans) == 12` is a very weak assertion. This PR asserts the
exported traces and spans more precisely in a readable tree format. And
when the format of an exported trace/span changes (e.g. a new key is
added to every span), you can use `pytest --inline-snapshot=fix` to
update all relevant tests automatically. See
https://15r10nk.github.io/inline-snapshot/latest/ for more info.
2025-03-17 17:59:04 -04:00
Alex Hall 09279d164e mypy 2025-03-17 23:56:42 +02:00
Alex Hall 3ff9238dae Merge branch 'main' of github.com:openai/openai-agents-python into alex/inline-snapshot 2025-03-17 23:55:56 +02:00
Rohan Mehta 7253030b0c Fix typo on Agent documentation (#151)
Argument name is not description but handoff_description
2025-03-17 16:51:47 -04:00
Carlos Souza 268ea2f80d Fix lint 2025-03-17 16:14:28 -04:00
Rohan Mehta 7f1b04e4f3 Fix handoffs example use cases (#156)
## Changes
- In this handoff example, we need to use `first_agent` with
`random_number_tool`, instead of `second_agent` without that tool, since
the user is asking to generate a random number.
- fixed typo in comments
2025-03-17 15:59:18 -04:00
Rohan Mehta d5fbf42a9d fix typo in agent_lifecycle_example.py (#161) 2025-03-17 15:59:00 -04:00
Rohan Mehta 2cccc61118 docs: add arize-phoenix to tracing documentation (#169) 2025-03-17 15:58:28 -04:00
Rohan Mehta 4bb506e16b docs: List LangSmith tracing integration (#197)
LangChain employee/maintainer, happy to make edits to our
docs/integrations if needed.
2025-03-17 15:58:20 -04:00
Rohan Mehta 9876c551bc fix reasoning order in examples (#186)
I think we need to put reasoning-related outputs first to encourage CoT
reasoning.
2025-03-17 15:57:52 -04:00
Rohan Mehta ecf4f92801 Add TracingProcessor export to __init__.py (#192)
# Summary
This adds the missing TracingProcessor export to  __init__.py.

# Behavior
When trying to add a custom tracing processor, the TracingProcessor
importing fails with not found error when trying the example usage
proposed in issue #164

Specifically this line throws the error:
`add_trace_processor(MyTracingProcessor("output"))`

# Expected Behavior
Inspecting the init file, simply the import/export was missing. Adding
these made the example code work for me

# Test plan
Local dev of example code in #164

# Issue number
#164

# Checks
None
2025-03-17 15:39:04 -04:00
Rohan Mehta 8d14695f51 Update tests and docs for strict mode decorator 2025-03-17 15:06:57 -04:00
Dmitry Pimenov 807e95681f Update tracing docs (#204)
Update the README to point to the list of tracing processors. The docs
will contain all the external processors, so the readme doesn't get too
long.
2025-03-17 12:02:44 -07:00
Rohan Mehta 18397319e2 Update tracing docs 2025-03-17 14:57:43 -04:00
Rohan Mehta 165366b8e5 Create a utils directory (#195)
Moves utils files into a separate directory so we don't end up with a
massive utils file

---
[//]: # (BEGIN SAPLING FOOTER)
* #196
* __->__ #195
2025-03-17 14:26:49 -04:00
Rohan Mehta 2ad3bf3fdb Pretty print result classes (#196)
These classes print a really long, unreadable output by default. This
trims it to the main useful info (i.e. output, last agent, overview of
run).

---
[//]: # (BEGIN SAPLING FOOTER)
* __->__ #196
* #195
2025-03-17 14:26:43 -04:00
Rohan Mehta ffdafc107d Add ZDR callout in tracing docs (#199)
Add callout for ZDR intracing
2025-03-17 14:26:34 -04:00
James Hills ff0af156bd Update tracing.md
Add callout for ZDR intracing
2025-03-17 09:13:22 -07:00
Bagatur f96d352142 docs: List LangSmith tracing integration 2025-03-17 08:47:28 -07:00
Rohan Mehta 417cdc5efe Pretty print result classes 2025-03-17 11:11:39 -04:00
Vincenzo Domina f6e59277b1 Add TracingProcessor export to __init__.py 2025-03-17 10:37:43 +01:00
MartinEBravo 4dc9b6712e Merge branch 'main' of https://github.com/openai/openai-agents-python into feat/draw_graph 2025-03-17 10:17:36 +01:00
heartkilla 08400fb4aa fix reasoning order in examples 2025-03-17 14:56:43 +09:00
Rohan Mehta 4719471cc3 utils directory 2025-03-16 18:48:45 -04:00
Rohan Mehta d60a413c14 feat: Add strict_mode option to function_schema and function_tool (#60)
This PR introduces a `strict_mode: bool = True` option to
`@function_tool`, allowing optional parameters when set to False. This
change enables more flexibility while maintaining strict JSON schema
validation by default.

resolves #43 

## Changes:

- Added `strict_mode` parameter to `@function_tool` and passed it to
`function_schema` and `FunctionTool`.
- Updated `function_schema.py` to respect `strict_mode` and allow
optional parameters when set to False.
- Added unit tests to verify optional parameters work correctly,
including multiple optional params with different types.

## Tests:

- Verified function calls with missing optional parameters behave as
expected.
- Added async tests to validate behavior under different configurations.
2025-03-16 17:43:46 -04:00
Víctor Mayoral Vilches 62450ef40b Add litellm support
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-16 21:01:51 +01:00
Víctor Mayoral Vilches 5983b445ec Add litellm iterations 2025-03-16 21:01:26 +01:00
Alexander Song add02a9f9c docs: add arize-phoenix to tracing documentation 2025-03-14 17:50:10 -07:00
Víctor Mayoral Vilches 2cc95d9a00 Add Ollama example
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-14 15:26:58 +01:00
Alex Hall 8722f91a59 Merge branch 'main' of github.com:openai/openai-agents-python into alex/inline-snapshot 2025-03-14 14:16:34 +02:00
CCM dfd8b40a98 fix typo in agent_lifecycle_example.py 2025-03-14 19:14:26 +08:00
Kento Yamanaka 2aec6b1390 fix: use first_agent instead of second_agent for a task to generate random number 2025-03-13 18:26:49 -07:00
Carlos Souza d6e4bd12e0 Fix typo on Agent documentation
Argument name is not description but handoff_description
2025-03-13 16:18:40 -04:00
Rohan Mehta f8d856f04d Create model_provider.md 2025-03-13 14:43:14 -04:00
Rohan Mehta 94792b7d0d Consolidate to one logger (#149)
Results in double logging if we dont. Closes #141.
2025-03-13 11:38:18 -07:00
Vincent Koc 33693eccb0 Merge branch 'main' into patch-1 2025-03-14 05:33:08 +11:00
Rohan Mehta 8e6f232b21 Update tracing docs to be correct (#146)
Incorrect docs. Closes #121
2025-03-13 10:55:57 -07:00
Rohan Mehta e863ef255d Consolidate to one logger 2025-03-13 13:55:15 -04:00
Rohan Mehta ed9d66b883 Update model docs with common issues (#148)
These are common issues faced by devs, so adding docs to help.
2025-03-13 10:53:50 -07:00
Martín Bravo ed7bad55ee Linting 2025-03-13 18:49:12 +01:00
Martín Bravo 9edf335258 Add documentation and example for agent visualization using Graphviz 2025-03-13 18:48:12 +01:00
Rohan Mehta d60e7f48fc Update model docs with common issues 2025-03-13 13:43:18 -04:00