Skip to content

docs(examples): with-intelligence-export — ship loop traces to Tangle Intelligence#70

Merged
drewstone merged 2 commits into
mainfrom
examples/tangle-intelligence-export
May 28, 2026
Merged

docs(examples): with-intelligence-export — ship loop traces to Tangle Intelligence#70
drewstone merged 2 commits into
mainfrom
examples/tangle-intelligence-export

Conversation

@drewstone
Copy link
Copy Markdown
Contributor

Closes the 'no example wires the OTEL exporter to hosted intelligence' gap. Two paths, same pipeline: built-in createOtelExporter (endpoint at .../v1/otlp, it appends /v1/traces) + loopEventToOtelSpan, and a raw-OTLP POST for bring-your-own traces. Tenant resolves from the Bearer key. Insights via GET /v1/insights/*.

drewstone added 2 commits May 28, 2026 16:27
… Intelligence

Adds examples/with-intelligence-export/ showing both integration paths into the
hosted intelligence backend: the built-in createOtelExporter (point endpoint at
.../v1/otlp; it appends /v1/traces → the ingest route) wired via
loopEventToOtelSpan per loop event, and a raw-OTLP POST for bring-your-own
traces with no runtime. Insights read back via GET /v1/insights/*; tenant
resolves from the Bearer key. Indexed in examples/README.md.
@drewstone drewstone merged commit ed857e6 into main May 28, 2026
1 check failed
tangletools pushed a commit that referenced this pull request May 28, 2026
tangletools added a commit that referenced this pull request May 28, 2026
…elligence pipe (no sandbox) (#72)

* docs(examples): agents-of-all-shapes — any framework → one Tangle Intelligence pipe (no sandbox)

A QA-verified showcase that Tangle Intelligence works with ANY agent, not just
our sandbox. Tangle runtime, OpenAI-compatible router (tcloud/OpenRouter),
Mastra, Claude Agent SDK, and a Python agno agent all converge on the same
canonical OTel GenAI spans → fromOtelSpans → analyzeRuns → InsightReport,
computed in-process (no sandbox, no deploy, no server).

- shared/intelligence.ts: the one contract — toInsightReport(spans) +
  shipToTangleOtlp(spans) over standard gen_ai.* OTel attributes + score
- shapes.ts: 4 TS shapes as deterministic batches (CI-verifiable, no key) with
  the exact live wiring documented per framework
- python-agno/: runnable agno → OTLP script
- run.ts: merges all shapes → fleet InsightReport + per-shape breakdown
- tests/agents-of-all-shapes.test.ts: proves each shape → real InsightReport +
  cross-framework fleet aggregation + real cost from gen_ai.usage.cost_usd

377/377, typecheck + biome clean.

* fix(lint): format with-intelligence-export example (CI lint gate; format fix from #70 was lost in merge)

---------

Co-authored-by: Drew Stone <drewstone329@gmail.com>
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