Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions docs/user-guide/deploy/operating-agents-in-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,16 @@ For improved user experience in production applications, leverage streaming via
# For web applications
async def stream_agent_response(prompt):
agent = Agent(...)

...

async for event in agent.stream_async(prompt):
if "data" in event:
yield event["data"]
```

See [Async Iterators](../../user-guide/concepts/streaming/async-iterators.md) for more information.

### Parallelism Settings

Control parallelism for optimal resource utilization:

```python
# Limit parallel tool execution based on your infrastructure capacity
agent = Agent(
max_parallel_tools=4 # Adjust based on available resources
)
```

### Error Handling

Implement robust error handling in production:
Expand Down
11 changes: 1 addition & 10 deletions docs/user-guide/observability-evaluation/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ result = agent("What is 125 * 37?")

When running this code with logging enabled, you'll see logs from different components of the SDK as the agent processes the request, calls the calculator tool, and generates a response. The following sections show examples of these logs:

### Agent Lifecycle

Logs related to agent initialization and shutdown:

```
DEBUG | strands.agent.agent | thread pool executor shutdown complete
```

### Tool Registry and Execution

Logs related to tool discovery, registration, and execution:
Expand All @@ -85,8 +77,7 @@ WARNING | strands.tools.registry | tool_name=<invalid_tool> | spec validation fa
DEBUG | strands.tools.registry | tool_name=<calculator> | loaded dynamic tool config

# Tool execution
DEBUG | strands.tools.executor | tool_name=<calculator> | executing tool with parameters: {"expression": "125 * 37"}
DEBUG | strands.tools.executor | tool_count=<1> | submitted tasks to parallel executor
DEBUG | strands.event_loop.event_loop | tool_use=<calculator_tool_use_id> | streaming

# Tool hot reloading
DEBUG | strands.tools.registry | tool_name=<calculator> | searching directories for tool
Expand Down