Typed by design.
Define agents and tools in TypeScript. Validate inputs and outputs at runtime.
Explore typed toolsFrom your first agent to durable workflows.
Typed tools, any model, and control over every run.
npm install @fevex/core01 A SMALL API. A SOLID FOUNDATION.
Define an agent, give it a model, and run it. Add tools and infrastructure when your application needs them.
Open the full quickstartimport { createFevex, defineAgent } from '@fevex/core';
import { fakeModel } from '@fevex/core/testing';
const app = createFevex({
models: { default: fakeModel({ output: 'Hello from FEVEX.' }) },
agents: [defineAgent({
name: 'assistant',
instructions: 'Be clear. Be helpful.',
})],
});
const result = await app.runAgent('assistant', { input: 'Hello!' });
console.log(result.output); // Hello from FEVEX.Runs locally. No API key required.
import { defineTool } from '@fevex/core';
import { z } from 'zod';
export const getAccount = defineTool({
name: 'accounts_get',
description: 'Get an account by ID.',
inputSchema: z.object({ accountId: z.number() }),
outputSchema: z.object({
accountId: z.number(), status: z.literal('active'),
}),
execute({ accountId }) {
return { accountId, status: 'active' };
},
});This example also uses Zod: npm install zod.
import { createOpenAI } from '@fevex/openai';
import { createDeepSeek } from '@fevex/deepseek';
const openai = createOpenAI({
apiKey: process.env.OPENAI_API_KEY!,
});
const deepseek = createDeepSeek({
apiKey: process.env.DEEPSEEK_API_KEY!,
});
// Choose a model ID supported by your provider.
export const models = {
default: openai(process.env.OPENAI_MODEL!),
alternative: deepseek(process.env.DEEPSEEK_MODEL!),
};Add the provider package and your server-side API key.
import { createFevex, defineAgent } from '@fevex/core';
import { fakeModel } from '@fevex/core/testing';
const app = createFevex({
models: { default: fakeModel({ output: 'Hello from FEVEX.' }) },
agents: [defineAgent({ name: 'assistant', instructions: 'Be helpful.' })],
onEvent(event) {
console.log(event.type);
},
});
await app.runAgent('assistant', { input: 'Hello!' });
// run.started → model.started → … → run.completedA local example with observable lifecycle events.
02 ENGINEERED TO FIT YOUR STACK
Keep behavior explicit, your models replaceable, and your application in control.
Define agents and tools in TypeScript. Validate inputs and outputs at runtime.
Explore typed toolsOne small contract for every provider. Add adapters without changing your application.
Meet ModelGatewayCompose workflows and teams. Add a persistent store for durable execution and recovery.
Explore workflows03 AN OPEN ECOSYSTEM
Install only what you need. Models, remote tools and persistence live in optional adapters.
Connect the intelligence your agent needs.
Bring external systems into a controlled tool loop.
Keep runs durable and make execution observable.
04 BEYOND THE HAPPY PATH
Validate tool inputs and outputs. Follow lifecycle events, require approvals, and recover durable runs with a persistent store.
Explore durable execution Early MVP · APIs may evolverun.startedmodel.completedtool.completedrun.completedVALIDATION BOUNDARIES
05 FROM THE REPOSITORY
YOUR NEXT AGENT STARTS HERE
Open source · Apache-2.0 · TypeScript