The absolute minimum: one model, one agent, one YAML file — start chatting.
load()— the single entry point to strands-compose. Give it a YAML file, get back a ready-to-use agent.- A minimal
config.yamlwith just a model and an agent — nothing else needed. resolved.entry— call it with a string and you get the agent's answer. No boilerplate.
load("config.yaml") reads the file, creates a BedrockModel and a strands Agent, and
returns a ResolvedConfig. The .entry attribute is the agent you marked with entry: in
the YAML — you can call it directly like a function.
# config.yaml — this is all you need
models:
default:
provider: bedrock
model_id: openai.gpt-oss-20b-1:0
agents:
assistant:
model: default
system_prompt: You are a concise and helpful assistant.
entry: assistantfrom strands_compose import load
resolved = load("config.yaml")
result = resolved.entry("What is Python?")- AWS credentials configured (
aws configureor environment variables) - Dependencies installed:
uv sync
uv run python examples/01_minimal/main.pyWhat is the capital of France?Explain what a Python generator is in one sentence.Write a haiku about software engineering.
Strands agents log actions to the console through their default callback_handler.
If you want cleaner example output, set the handler to null in agent_kwargs for any agent:
agents:
my_agent:
agent_kwargs:
callback_handler: null # or ~