Skip to content

Commit 0ffb9e0

Browse files
authored
docs: update README.md
1 parent 5d4a752 commit 0ffb9e0

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ from agents.sandbox.sandboxes import UnixLocalSandboxClient
6060
agent = SandboxAgent(
6161
name="Workspace Assistant",
6262
instructions="Inspect the sandbox workspace before answering.",
63-
default_manifest=Manifest(
64-
entries={
65-
"repo": GitRepo(repo="openai/openai-agents-python", ref="main"),
66-
}
67-
),
63+
default_manifest=Manifest(entries={"repo": GitRepo(repo="openai/openai-agents-python", ref="main")}),
6864
)
6965

7066
result = Runner.run_sync(
@@ -75,11 +71,28 @@ result = Runner.run_sync(
7571
)
7672
print(result.final_output)
7773

78-
# This project provides a Python SDK for building multi-agent workflows.
74+
# Output: "This project provides a Python SDK for building multi-agent workflows."
7975
```
8076

8177
(_If running this, ensure you set the `OPENAI_API_KEY` environment variable_)
8278

79+
## Run an agent without a sandbox
80+
81+
You can still use a regular `Agent` when your workflow does not need a filesystem workspace or sandbox lifecycle.
82+
83+
```python
84+
from agents import Agent, Runner
85+
86+
agent = Agent(name="Assistant", instructions="You are a helpful assistant")
87+
88+
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
89+
print(result.final_output)
90+
91+
# Code within the code,
92+
# Functions calling themselves,
93+
# Infinite loop's dance.
94+
```
95+
8396
(_For Jupyter notebook users, see [hello_world_jupyter.ipynb](https://github.com/openai/openai-agents-python/blob/main/examples/basic/hello_world_jupyter.ipynb)_)
8497

8598
Explore the [examples](https://github.com/openai/openai-agents-python/tree/main/examples) directory to see the SDK in action, and read our [documentation](https://openai.github.io/openai-agents-python/) for more details.

0 commit comments

Comments
 (0)