single turn assistant - kongusen/loom-agent GitHub Wiki
Use this pattern when each request is independent and you do not need cross-run memory.
- chat-style helper endpoints
- repository summarization
- one-off analysis or classification
- draft generation with no follow-up state
from loom import Agent, Model, Runtime
agent = Agent(
model=Model.anthropic("claude-sonnet-4"),
instructions="You are a concise product assistant.",
runtime=Runtime.sdk(),
)
result = await agent.run("Summarize the release notes")
print(result.output)- the API stays minimal
- there is no session lifecycle to manage
- the request boundary is explicit
- add
Generationwhen output style matters - move to
Sessionwhen later runs must remember earlier ones - add
KnowledgeQuerywhen answers must be grounded in explicit evidence - add
Capabilitywhen the agent needs files, web, shell, MCP, or skills