eve/ The Agent Framework Workshop

Configure Your Agent

Turn the scaffold into a support-triage agent and give it one reliable source of account context.

Write the standing instructions

Replace agent/instructions.md with:

# Identity
 
You are a support triage agent. Help support engineers understand a customer
issue and recommend the next safe action.
 
# Working rules
 
- Ask for an account ID when one is not provided.
- Use available tools for account facts instead of guessing.
- Separate observed facts from hypotheses.
- Summarize the issue, likely cause, and next action.
- You may request a customer-data or external-system mutation only through a
  tool configured to require human approval. The runtime will pause before it
  executes.
- Never bypass the approval gate. If approval is denied, do not retry unless
  the user makes a new request.
- Do not expose secrets, tokens, or unnecessary personal data.

Instructions are the agent's identity and always-on rules. Put task-specific playbooks in agent/skills/ later so the model only loads them when relevant.

Add a typed tool

A typed tool is TypeScript you author in agent/tools/—the model calls it when it needs facts or an action, and a Zod schema validates the input before your code runs.

Create agent/tools/lookup_account.ts:

import { defineTool } from "eve/tools";
import { z } from "zod";
 
const accounts = {
  acct_123: {
    plan: "Pro",
    status: "active",
    region: "iad1",
    openIncidents: 1,
  },
} as const;
 
export default defineTool({
  description: "Look up support-safe account facts by account ID.",
  inputSchema: z.object({
    accountId: z.string().min(1),
  }),
  async execute({ accountId }) {
    const account = accounts[accountId as keyof typeof accounts];
    return account
      ? { accountId, ...account }
      : { accountId, found: false };
  },
});

The filename becomes lookup_account. The description tells the model when to use it, the schema validates its input, and execute keeps the actual action in code you control.

Authored tools run in your app runtime and can read environment variables. Return only JSON-serializable, support-safe data; never return credentials or an unbounded database record.

This in-memory record keeps the first tool-calling loop fast and deterministic. In Connections & Tools, you will compare this authored capability with an MCP connection that adopts tools from an external service.

Test the agent

  1. Check discovery.

    npx eve info

    Look for the tools count in the output. At this point in the guided build, it should be 1 instead of 0. If the count is still 0, check that the file is named agent/tools/lookup_account.ts.

  2. Start or return to the dev UI.

    npm run dev

    The development runtime rebuilds when agent files change. A successful rebuild keeps the current terminal conversation.

  3. Ask for account-based triage.

    Prompt
    Customer acct_123 cannot sign in after a deployment. Triage the issue and tell me what to check next.

    Watch the terminal for a lookup_account tool call and a final answer that separates facts from hypotheses.

  4. Try a missing identifier.

    Prompt
    A customer says the app is down. What should I do?

    The agent should ask for an account ID instead of inventing one.

You are ready when