File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,22 @@ OpenAPI:
8282- FastAPI publishes ` /openapi.json` and interactive docs at ` /docs` .
8383- Schemas reflect ` AskRequest` and ` AskResponse` models in ` micro_agent/server.py` .
8484
85+ # ## API Examples
86+ - Ask, capture ` trace_id` , then fetch the full trace by id:
87+ ` ` ` bash
88+ RESP=$( curl -s http://localhost:8000/ask \
89+ -H ' content-type: application/json' \
90+ -d ' {"question":"Add 12345 and 67890, then UTC time.","max_steps":6}' )
91+ echo " $RESP " | jq .
92+ TID=$( echo " $RESP " | jq -r .trace_id)
93+ curl -s http://localhost:8000/trace/$TID | jq .
94+ ` ` `
95+
96+ - Replay the saved JSONL locally using the CLI (last record by default index -1):
97+ ` ` ` bash
98+ micro-agent replay --path traces/$TID .jsonl --index -1
99+ ` ` `
100+
85101# # Tools
86102- Built-ins live in ` micro_agent/tools.py` :
87103 - ` calculator` : safe expression evaluator. Supports ` + - * / ** % // ( )` and ` !` via rewrite to ` fact(n)` .
You can’t perform that action at this time.
0 commit comments