import anthropic
import quint_agent
from quint_agent.integrations.anthropic import guarded_dispatch
quint_agent.init(api_key="qak_...")
client = anthropic.Anthropic()
tools_map = {
"read_file": read_file,
"run_command": run_command,
"query_db": query_db,
}
response = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=4096,
tools=[...], # your tool definitions
messages=[{"role": "user", "content": "Analyze the codebase"}],
)
for block in response.content:
if block.type == "tool_use":
# guarded_dispatch captures + policy-checks before executing
result = guarded_dispatch(block.name, block.input, tools_map)