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

Examples: Support ticket categorization, email triage, lead routing, intent classification.a ticket, email, or message.
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

Examples: Invoice processing, contract extraction, form parsing, document processing.
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

Examples: Choosing the right API, selecting the correct workflow, routing task between tools.
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

Examples: Internal developer assistants, code review workflows, spec-to-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

Examples: Support thread summaries, meeting notes, CRM enrichment, batch document processing.
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:

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: