npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@polymind-inc/agent-framework-agentserver

v0.3.0

Published

Microsoft Foundry hosted-agent container protocol servers (Responses v2.0.0 and Invocations). Independent of the Agent Framework.

Readme

@polymind-inc/agent-framework-agentserver

Constituent package. The supported way to use the Agent Framework is the main @polymind-inc/agent-framework package, which re-exports everything here under @polymind-inc/agent-framework/agentserver (plus /agentserver/node and /agentserver/observability) and pins this package to its exact version. Installing this package directly works and resolves to the same modules, but examples and documentation import through the main package.

The Microsoft Foundry hosted-agent container protocols, as servers. Independent of the Agent Framework; the Agent Framework adapters live in @polymind-inc/agent-framework-foundry/hosting. Both are exposed as Web-standard fetch handlers with a Node adapter on the ./node subpath:

  • ResponsesServer — the Responses container protocol v2.0.0: routing, SSE framing and sequence numbers, the lifecycle contract, id generation, the header contract, storage abstractions, and error shapes.
  • InvocationsServer — the Invocations protocol, for callers that cannot speak the Responses request shape. The payload is deliberately unprescribed: the request body reaches the handler unread, and the handler's Response — its body, status and content type — is what the caller gets. This layer owns the routes (POST /invocations, GET /invocations/{id}, POST /invocations/{id}/cancel, /readiness), invocation and session id resolution and their response headers, cancellation, error classification, SSE keep-alive injection, and trace propagation.
npm install @polymind-inc/agent-framework-agentserver

Trust model

This server is designed to run behind the Microsoft Foundry gateway. It trusts the x-agent-user-id header for user partitioning and, per the container contract, serve binds 0.0.0.0:${PORT:-8088}. Exposing that port outside the gateway means trusting whoever can reach it to say who the user is — anyone on the network could then read any user's conversations from the local response store. Do not expose it directly.

Known protocol deviations

Deliberate second-order deviations from the reference implementations, kept until a protocol revision makes a coordinated change worthwhile: response.created reports status: "queued" where Python reports in_progress; null-ish ResponseObject fields are omitted; _internal_metadata is not stripped on ingress; reads are served (not 503) while draining; conversation ids are alias-stored as responses; the request's instructions field is ignored; versioned toolbox endpoint formats are unsupported; error messages are carried in the HTTP body as well (Python only carries them on streamed terminal events). Background runs replay-fail-closed when the store cannot persist events. The Azure Monitor exporter dependency is a beta release line, pinned exactly for that reason.

Telemetry

serve configures OpenTelemetry before it binds — the reference hosts (.NET Azure.AI.AgentServer.Core, Python azure-ai-agentserver-core) do the same at startup, so a deployed container needs no code to light up tracing. The protocol layer itself touches only @opentelemetry/api; the SDK wiring lives on the ./observability subpath (setupHostObservability) and is driven by the environment:

| Variable | Effect | | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | APPLICATIONINSIGHTS_CONNECTION_STRING | Azure Monitor export. A Foundry deployment injects this. | | APPLICATIONINSIGHTS_AUTH_MODE=entra | Authenticate Azure Monitor with the managed identity. | | OTEL_EXPORTER_OTLP_ENDPOINT (or a per-signal …_TRACES_/…_METRICS_ENDPOINT) | OTLP export. OTEL_EXPORTER_OTLP_PROTOCOL (or per-signal) picks http/protobuf (default) or grpc — gRPC needs the optional @opentelemetry/exporter-trace-otlp-grpc / @opentelemetry/exporter-metrics-otlp-grpc packages installed. | | FOUNDRY_AGENT_NAME / _VERSION / _INSTANCE_CLIENT_ID / FOUNDRY_PROJECT_ARM_ID … | Resource identity (service.name, service.version) and the Foundry attributes stamped on every span (gen_ai.agent.*, microsoft.foundry.project.id, …). | | OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT | Opt into recording message content on spans. Read by @polymind-inc/agent-framework-core; off by default. |

With no exporter variable set, providers and propagation are still registered but nothing is exported — the container behaves exactly as before. Every turn force-flushes on completion, because a hosted sandbox may be frozen the moment the response is out: every answered request flushes as it is answered — refusals and handler failures included — except the two answers that outlive their request, which flush when the SSE stream closes and when the background run ends. Inbound traceparent / baggage headers are always propagated to the handler's spans, and POST /responses additionally stamps its own azure.ai.agentserver.response_id / .conversation_id / .streaming / .x-request-id baggage, so gen_ai.conversation.id lands on spans whether or not the caller speaks baggage. No server span is created, so the framework's invoke_agent parents directly under the calling service.

Opt out, or pass options through:

await serve(server, { observability: false });

Part of Agent Framework for TypeScript — an independent community implementation of the Microsoft Agent Framework programming model. Not an official Microsoft product, and not affiliated with or endorsed by Microsoft. MIT licensed.