Docs

    Frameworks

    Supported frameworks

    Every web and agent framework the EvalKit SDKs support, the one line that sets each one up, and a link to its guide with a tutorial that runs end to end.

    Each framework below has a guide of its own: what a request or an agent run looks like in the trace view, where init() goes and why, a small support agent with one model and one tool to run and send a request to, how to set the session, user and agent name, and the pitfalls of that framework with their fixes. Every tutorial ran end to end with syntropylabs-evalkit: the Strands, Google ADK and Python MCP ones with 0.3.4, the others with 0.3.5.

    Web frameworks

    FrameworkSDKSetup after init()
    FastAPI and StarlettePythonapp.add_middleware(evalkit.EvalKitMiddleware)
    FlaskPythonevalkit.instrument_flask(app)
    DjangoPython"evalkit.EvalKitDjangoMiddleware" in MIDDLEWARE, after AuthenticationMiddleware
    LitestarPythonLitestar(..., middleware=[evalkit.create_litestar_middleware()])
    ExpressTypeScriptNone: init() makes each request a trace, named by its route
    FastifyTypeScriptawait app.register(evalkit.fastifyPlugin()), which names request spans by route
    KoaTypeScriptapp.use(evalkit.koaMiddleware()), which names request spans by route
    HonoTypeScriptapp.use("*", evalkit.honoMiddleware()), which names request spans by route
    hapiTypeScriptawait server.register(evalkit.hapiPlugin()), which names request spans by route
    NestJSTypeScriptawait evalkit.enableNestjsAutoTrace(app), which adds a span for each controller and service method

    Agent frameworks

    FrameworkSDKSetup after init()
    LangChain and LangGraphPython, TypeScriptNone: init() adds a callback handler to every run
    LlamaIndexPythonNone: init() registers handlers on LlamaIndex's instrumentation
    Strands AgentsPythonNone: Strands records OpenTelemetry spans that init() receives
    MCP clientsPython, TypeScriptNone: each tool call through an MCP client session is a tool span
    Google ADKPythonNone: agent runs and tool calls are patched
    Claude Agent SDKPythonNone: query() and ClaudeSDKClient are patched

    What every setup has in common

    • Call init() once per process, at startup, before the framework and the model clients are imported. In TypeScript, put it in its own module and import that module first.
    • In Python, each framework needs its middleware line for requests to become traces. In TypeScript, init() patches the Node.js HTTP and HTTPS servers, so every request is a trace already; the Fastify, Koa, Hono and hapi adapters name its span by the route.
    • Outside a request, in a script, a worker or an agent run of its own, open a root span for each unit of work with evalkit.start_trace() (TypeScript startTrace() with withTrace()), or each call becomes a trace of its own. A LangGraph graph run in TypeScript opens its own root span.
    • Call flush() only where the process is about to end: a script, a job, a serverless invocation. A server never needs it on the request path.

    Frameworks that are not listed, such as Next.js, have no adapter in either SDK and are not covered by these guides. To trace a framework without an adapter, open a root span per request or task yourself, as above. For Next.js, Serverless and edge runtimes shows where init() goes and how a route flushes with flushAfter, from 0.3.6. The model providers, HTTP clients and databases the SDKs trace on their own are on What is traced automatically.

    EvalKit is built by SyntropyLabs. Published on PyPI and npm.