Skip to content

feat: capture streamed answers whole; customer ids; outcome() - #11

Merged
kbhatnagar1506 merged 1 commit into
mainfrom
feat/capture-complete
Oct 2, 2026
Merged

kbhatnagar1506 merged 1 commit into
mainfrom
feat/capture-complete

Conversation

@kbhatnagar1506

Copy link
Copy Markdown
Owner

What

  • Streamed answers captured whole. Each chunk reaches the agent untouched; a copy is kept and, when the stream ends, assembled into the answer a non-streamed call would have.
    • Covers OpenAI chunks and Anthropic events, compiled or forwarded, sync and async in Python.
    • A stream the agent stops reading is kept and marked stream_complete: false.
  • Customer ids: via conversation(...) with a customer, or per call. Captured as end_user, scrubbed like everything else.
  • outcome(conversation_id, label): resolved, escalated, unresolved, abandoned, reopened or complaint, sent in the background to /v1/outcome. AgentCompile then learns only from conversations that went well.
  • README: a new "Outcomes and customers" section.

Proven live: Gemini 2.5 Flash on Vertex through the Python SDK and a real server. 12/12 calls captured, 3/3 conversations whole, outcomes stored, fail-open works (kbhatnagar1506/agent-compiler docs/results/2026-10-01-live-gemini-run.md).

Pairs with kbhatnagar1506/agent-compiler branch capture-complete (the /v1/outcome endpoint). Merge that first.

🤖 Generated with Claude Code

- Streams: each chunk reaches the agent untouched; a copy is kept and, when the stream ends,
  assembled into the answer a non-streamed call would have (OpenAI chunks, Anthropic events,
  sync and async, compiled or forwarded). A stream the agent stops reading is kept and marked
  stream_complete: false.
- Customers: conversation(id, customer=...) or customer_id= on a call; captured as end_user,
  scrubbed like everything else.
- outcome(conversation_id, label): resolved, escalated, unresolved, abandoned, reopened or
  complaint, sent in the background to /v1/outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kbhatnagar1506
kbhatnagar1506 merged commit 8af130e into main Oct 2, 2026
5 checks passed
@kbhatnagar1506
kbhatnagar1506 deleted the feat/capture-complete branch October 2, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant