Practical overview
When it fits
Use Fastagent when an existing file-defined agent needs a serving layer for an app, channel or endpoint. For app embedding, it fits projects that want to keep authentication, database and hosting decisions in their own stack.
Who it is for
- Developers who already have an agent directory and want to expose it through an application or service.
- Teams connecting an agent to messaging channels, webhooks or HTTP/SSE.
- Application developers who want to call an agent from their own code and retain control of app infrastructure.
Documented uses
- Serve an agent directory from an application route.
- Expose the same agent through Telegram, Slack, Feishu or Lark, HTTP/SSE, webhooks or a custom adapter.
- Call an agent through the framework's invoke interface from application code.
- Generate deployment configuration for Docker, Fly, Railway or AWS Bedrock AgentCore.
Requirements & limits
The repository is public and licensed under MIT. The documented Node.js requirement is version 22.19 or newer.
- Fastagent consumes an existing agent directory rather than providing a new agent-authoring DSL.
- It is a serving layer, not a workflow engine; deterministic multi-step orchestration is left to the host app or another workflow system.
- App embedding leaves authentication, database and infrastructure choices with the application.
- The documented CLI deployment targets are Docker, Fly, Railway and AWS Bedrock AgentCore.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Scaffold and test a FastAgent locally
Create a FastAgent directory and send it a local test turn.
Before you start
- Node.js >= 22.19
- FastAgent CLI installed globally with npm
Steps
Install the CLI with the command below.
npm i -g @fastagent-sh/fastagentRun
fastagent init my-agentto scaffold an agent directory.Change into the directory with
cd my-agent, then start the development server withfastagent dev.Send a local test turn with the command below.
curl -N -X POST localhost:8787/invoke -H 'content-type: application/json' -d '{"session":"s1","text":"hello"}'
Expected outcome
A scaffolded agent runs in development mode and receives a local invocation at the documented endpoint.
Guide limitations
- This recipe documents a local development test, not production deployment.
- The agent's runtime behavior depends on its directory definition; this recipe does not add or configure an agent definition.
Embed a directory-defined FastAgent in an app handler
Create an agent from a local directory and expose it through a Fetch-shaped POST handler.
Before you start
- Node.js >= 22.19
- An existing FastAgent agent directory
- The
@fastagent-sh/fastagentpackage installed in the app
Steps
Install the library in the app with the command below.
npm i @fastagent-sh/fastagentImport
createInvokeHandlerandcreatePiAgentFromDefinitionfrom@fastagent-sh/fastagent.Create the agent with
await createPiAgentFromDefinition("./agent", { model: "openai-codex/gpt-5.5" }).Export
POST = createInvokeHandler(agent)from the app's route module.
Expected outcome
The app route exports a Fetch-shaped POST handler backed by the directory-defined agent.
Guide limitations
- The example specifies a model but does not document model authentication or provider setup.
- The app retains responsibility for its authentication, database, and hosting.
- The example documents handler construction, not a particular framework's routing setup or a live request test.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 7 October 2026
- Original website title
- fastagent-sh/fastagent · Official homepage title · retained in its source language

