Use cases.
AgentLoop works anywhere an LLM produces an output that can later be reviewed and corrected by a human. If a reviewer can say:"This was wrong. Here's the correct answer." then AgentLoop can capture that correction and make it available for future similar requests.
Common Use Cases
Classification & routing
python
resp = openai.chat.completions.create( model="gpt-4o", messages=[ {"role": "system", "content": "Classify the ticket: billing | bug | feature | other."}, {"role": "user", "content": ticket_text}, ], agentloop={"tags": ["triage"]}, # correction: the right category )
Structured extraction
python
resp = openai.chat.completions.create( model="gpt-4o", messages=[ {"role": "system", "content": "Extract {invoice_no, total, due_date} as JSON."}, {"role": "user", "content": document_text}, ], agentloop={"tags": ["extraction", vendor_id]}, )
Agent tool selection
python
resp = openai.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": task}], tools=tool_schemas, agentloop={"tags": ["tool-routing"]}, # correction: the tool it should have picked )
Code generation
python
resp = openai.chat.completions.create( model="gpt-4o", messages=[ {"role": "system", "content": "Generate a handler following our internal SDK conventions."}, {"role": "user", "content": spec}, ], agentloop={"tags": ["codegen"]}, )
Summarization & enrichment pipelines
python
for record in batch: resp = openai.chat.completions.create( model="gpt-4o", messages=[ {"role": "system", "content": "Summarize the support thread in two sentences."}, {"role": "user", "content": record.text}, ], agentloop={"tags": ["summary", "batch"]}, )
Does AgentLoop fit?
AgentLoop is a good fit when:
- Your application uses an LLM to generate outputs.
- Humans review at least some of those outputs.
- Corrections are likely to be useful again in similar situations.
Rule of thumb
If a human reviewer can look at an output and say: "This is wrong, and here's the correct version." and you would like that lesson to influence future similar outputs, AgentLoop is likely a good fit.
Next steps
Once you've spotted your shape above:
- Get started — the one wrap call that powers all of these.
- Signals — for non-chat workloads especially, deciding which outputs to log for review matters most.
- Patterns — scoping memories with
user_idandsearch_user_idacross tenants and teams. - Reference — what's enforced on your data today.