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
52 changes: 52 additions & 0 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ below is the part that wires in governance.
Every example runs **offline** in `mode="sdk-only"` against a local policy, so you can try it
with no API keys and no outbound network.

These offline snippets also pass `enforcement_mode="observe"`, a demo posture for running
offline against a local policy. Before you copy a snippet into a real service, remove
`enforcement_mode="observe"` and `mode="sdk-only"`, and point the SDK at your gateway.

<!-- BEGIN GENERATED: quickstart-framework-tabs -->

=== "Agno"
Expand All @@ -119,6 +123,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="agno-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -165,6 +172,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="autogen-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -196,6 +206,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="crewai-research-crew",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -235,6 +248,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="custom-tool-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -271,6 +287,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="google-adk-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -299,6 +318,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="haystack-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -344,6 +366,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="langchain-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -375,6 +400,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="langchain-research-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -407,6 +435,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="langgraph-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -444,6 +475,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="llamaindex-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -507,6 +541,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="microsoft-agent-framework-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -536,6 +573,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="openai-agents-demo",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -564,6 +604,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="pydantic-ai-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -592,6 +635,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="semantic-kernel-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -621,6 +667,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="smolagents-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down Expand Up @@ -653,6 +702,9 @@ with no API keys and no outbound network.
api_key=api_key,
agent_id="strands-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/agno-tool-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
api_key=api_key,
agent_id="agno-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/autogen-tool-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
api_key=api_key,
agent_id="autogen-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/crewai-research-crew.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
api_key=api_key,
agent_id="crewai-research-crew",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/custom-tool-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
api_key=api_key,
agent_id="custom-tool-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/google-adk.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
api_key=api_key,
agent_id="google-adk-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/haystack-tool-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
api_key=api_key,
agent_id="haystack-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/langchain-basic-agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
api_key=api_key,
agent_id="langchain-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/langchain-research-agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
api_key=api_key,
agent_id="langchain-research-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/langgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
api_key=api_key,
agent_id="langgraph-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/llamaindex-tool-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
api_key=api_key,
agent_id="llamaindex-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
api_key=api_key,
agent_id="microsoft-agent-framework-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/openai-agents-sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
api_key=api_key,
agent_id="openai-agents-demo",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/pydantic-ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
api_key=api_key,
agent_id="pydantic-ai-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/semantic-kernel-tool-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
api_key=api_key,
agent_id="semantic-kernel-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/smolagents-tool-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
api_key=api_key,
agent_id="smolagents-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
3 changes: 3 additions & 0 deletions quickstart_snippets/strands-agents-tool-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
api_key=api_key,
agent_id="strands-demo-agent",
mode="sdk-only",
# No gateway here: the default posture fails closed when registration
# can't reach one, so an offline demo must name its dry-run posture.
enforcement_mode="observe",
) as ctx:
print(f" Agent: {ctx.client.agent_id}")
print(f" Gateway: {ctx.client.gateway_url}")
Expand Down
6 changes: 6 additions & 0 deletions test/unit/test_quickstart_claim_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,12 @@ class ClaimBinding:
"Names what the [runtime] extra adds to the install. Packaging composition; whether that binary is actually reachable is a separate, bound claim."
),
"You have three options:": ("A list lead-in with no predicate of its own."),
'These offline snippets also pass `enforcement_mode="observe"`, a demo posture for running offline against a local policy.': (
"Names the argument the offline snippets pass and the setting they are meant for. States no behaviour of observe mode; what that mode does is documented and bound elsewhere."
),
'Before you copy a snippet into a real service, remove `enforcement_mode="observe"` and `mode="sdk-only"`, and point the SDK at your gateway.': (
"An instruction to change two demo arguments and add a gateway endpoint when moving off the offline setup. An imperative about configuration, with no claim about what the SDK or gateway then does."
),
"**Let the SDK auto-start one.**": (
"The bold label of a bullet. The behavioural claim it introduces is the next sentence, which is bound and registered unproven."
),
Expand Down
Loading