Loading the notebook…
Loading the notebook…
Notebooks · First agents · 09
This notebook demonstrates the safe, inspectable reasoning layer in SHIPIT Agent.
Its imports and arguments are checked against shipit-agent 3.0. The outputs were saved when it was written, for an earlier release.
from pathlib import Path
import sys
import json
ROOT = (
Path.cwd().resolve().parent
if Path.cwd().name == "notebooks"
else Path.cwd().resolve()
)
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from examples.run_multi_tool_agent import build_demo_agent, build_llm_from_envllm = build_llm_from_env("bedrock")
agent = build_demo_agent(
llm=llm,
workspace_root=str(ROOT / ".shipit_notebooks" / "reasoning_demo"),
)
tool_names = [tool.name for tool in agent.tools]
[
name
for name in tool_names
if name
in {
"planner",
"plan_task",
"decompose_problem",
"synthesize_evidence",
"decision_matrix",
}
]reasoning = agent.reason(
"Choose the best rollout approach for a new internal CLI tool.",
observations=[
"A phased rollout reduces risk.",
"The team wants fast feedback.",
"Operational simplicity matters.",
],
options=["Immediate rollout", "Phased rollout", "Invite-only pilot"],
criteria=["risk", "speed of feedback", "operational simplicity"],
constraints=["Minimize disruption to internal users"],
)
reasoning.outputs.keys()json.dumps(reasoning.outputs, indent=2, default=str)[(event.type, event.message) for event in reasoning.events]