diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d0ddc7b2..dd252952c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,7 +79,7 @@ ### ⚠ BREAKING CHANGES * **core:** drop unused module-lifecycle public types; consolidate wire + session-file utilities ([#930](https://github.com/lobu-ai/lobu/issues/930)) -* **evals:** The in-house `lobu eval` command and YAML eval schema are removed. Migrate evals to promptfoo + @lobu/promptfoo-provider; see examples/personal-finance/agents/personal-finance/evals/promptfooconfig.yaml for the new pattern. +* **evals:** The in-house `lobu eval` command and YAML eval schema are removed. Migrate evals to promptfoo + @lobu/promptfoo-provider; see examples/personal-finance/evals/promptfooconfig.yaml for the new pattern. ### Features diff --git a/examples/agent-community/agents/agent-community/IDENTITY.md b/examples/agent-community/IDENTITY.md similarity index 100% rename from examples/agent-community/agents/agent-community/IDENTITY.md rename to examples/agent-community/IDENTITY.md diff --git a/examples/agent-community/agents/agent-community/SOUL.md b/examples/agent-community/SOUL.md similarity index 100% rename from examples/agent-community/agents/agent-community/SOUL.md rename to examples/agent-community/SOUL.md diff --git a/examples/agent-community/agents/agent-community/USER.md b/examples/agent-community/USER.md similarity index 100% rename from examples/agent-community/agents/agent-community/USER.md rename to examples/agent-community/USER.md diff --git a/examples/agent-community/agents/agent-community/evals/ping.yaml b/examples/agent-community/evals/ping.yaml similarity index 100% rename from examples/agent-community/agents/agent-community/evals/ping.yaml rename to examples/agent-community/evals/ping.yaml diff --git a/examples/agent-community/lobu.config.ts b/examples/agent-community/lobu.config.ts index d0a459d36..598a23ee9 100644 --- a/examples/agent-community/lobu.config.ts +++ b/examples/agent-community/lobu.config.ts @@ -13,7 +13,7 @@ const agentCommunity = defineAgent({ name: "agent-community", description: "Discover aligned members, explain why they should meet, and draft warm introductions", - dir: "./agents/agent-community", + dir: ".", providers: [ { id: "anthropic", diff --git a/examples/agent-community/tsconfig.json b/examples/agent-community/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/agent-community/tsconfig.json +++ b/examples/agent-community/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/atlas/lobu.config.ts b/examples/atlas/lobu.config.ts index f2a33acee..b1cf51564 100644 --- a/examples/atlas/lobu.config.ts +++ b/examples/atlas/lobu.config.ts @@ -11,7 +11,7 @@ const atlasCurator = defineAgent({ name: "atlas-curator", description: "Curate Atlas reference data — countries, cities, regions, industries, technologies, universities", - dir: "./agents/atlas-curator", + dir: ".", providers: [ { id: "z-ai", diff --git a/examples/atlas/tsconfig.json b/examples/atlas/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/atlas/tsconfig.json +++ b/examples/atlas/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/delivery/agents/delivery/IDENTITY.md b/examples/delivery/IDENTITY.md similarity index 100% rename from examples/delivery/agents/delivery/IDENTITY.md rename to examples/delivery/IDENTITY.md diff --git a/examples/delivery/agents/delivery/SOUL.md b/examples/delivery/SOUL.md similarity index 100% rename from examples/delivery/agents/delivery/SOUL.md rename to examples/delivery/SOUL.md diff --git a/examples/delivery/agents/delivery/USER.md b/examples/delivery/USER.md similarity index 100% rename from examples/delivery/agents/delivery/USER.md rename to examples/delivery/USER.md diff --git a/examples/delivery/lobu.config.ts b/examples/delivery/lobu.config.ts index 965ba263b..a636f3cdc 100644 --- a/examples/delivery/lobu.config.ts +++ b/examples/delivery/lobu.config.ts @@ -13,7 +13,7 @@ const delivery = defineAgent({ name: "delivery", description: "Help delivery teams keep milestones, blockers, owners, and artifacts aligned", - dir: "./agents/delivery", + dir: ".", providers: [ { id: "anthropic", diff --git a/examples/delivery/tsconfig.json b/examples/delivery/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/delivery/tsconfig.json +++ b/examples/delivery/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/ecommerce/agents/ecommerce-ops/IDENTITY.md b/examples/ecommerce/IDENTITY.md similarity index 100% rename from examples/ecommerce/agents/ecommerce-ops/IDENTITY.md rename to examples/ecommerce/IDENTITY.md diff --git a/examples/ecommerce/agents/ecommerce-ops/SOUL.md b/examples/ecommerce/SOUL.md similarity index 100% rename from examples/ecommerce/agents/ecommerce-ops/SOUL.md rename to examples/ecommerce/SOUL.md diff --git a/examples/ecommerce/agents/ecommerce-ops/USER.md b/examples/ecommerce/USER.md similarity index 100% rename from examples/ecommerce/agents/ecommerce-ops/USER.md rename to examples/ecommerce/USER.md diff --git a/examples/ecommerce/lobu.config.ts b/examples/ecommerce/lobu.config.ts index abda1f812..0a9825f04 100644 --- a/examples/ecommerce/lobu.config.ts +++ b/examples/ecommerce/lobu.config.ts @@ -13,7 +13,7 @@ const ecommerceOps = defineAgent({ name: "ecommerce-ops", description: "Manage subscriptions, process order changes, and resolve customer requests", - dir: "./agents/ecommerce-ops", + dir: ".", providers: [ { id: "anthropic", diff --git a/examples/ecommerce/tsconfig.json b/examples/ecommerce/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/ecommerce/tsconfig.json +++ b/examples/ecommerce/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/finance/agents/finance/IDENTITY.md b/examples/finance/IDENTITY.md similarity index 100% rename from examples/finance/agents/finance/IDENTITY.md rename to examples/finance/IDENTITY.md diff --git a/examples/finance/agents/finance/SOUL.md b/examples/finance/SOUL.md similarity index 100% rename from examples/finance/agents/finance/SOUL.md rename to examples/finance/SOUL.md diff --git a/examples/finance/agents/finance/USER.md b/examples/finance/USER.md similarity index 100% rename from examples/finance/agents/finance/USER.md rename to examples/finance/USER.md diff --git a/examples/finance/agents/finance/evals/ping.yaml b/examples/finance/evals/ping.yaml similarity index 100% rename from examples/finance/agents/finance/evals/ping.yaml rename to examples/finance/evals/ping.yaml diff --git a/examples/finance/lobu.config.ts b/examples/finance/lobu.config.ts index 16eeeff7a..acbe877f9 100644 --- a/examples/finance/lobu.config.ts +++ b/examples/finance/lobu.config.ts @@ -13,7 +13,7 @@ const finance = defineAgent({ name: "finance", description: "Help finance teams reconcile data, explain variance, and prepare reporting runs", - dir: "./agents/finance", + dir: ".", providers: [ { id: "anthropic", diff --git a/examples/finance/tsconfig.json b/examples/finance/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/finance/tsconfig.json +++ b/examples/finance/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/leadership/agents/leadership/IDENTITY.md b/examples/leadership/IDENTITY.md similarity index 100% rename from examples/leadership/agents/leadership/IDENTITY.md rename to examples/leadership/IDENTITY.md diff --git a/examples/leadership/agents/leadership/SOUL.md b/examples/leadership/SOUL.md similarity index 100% rename from examples/leadership/agents/leadership/SOUL.md rename to examples/leadership/SOUL.md diff --git a/examples/leadership/agents/leadership/USER.md b/examples/leadership/USER.md similarity index 100% rename from examples/leadership/agents/leadership/USER.md rename to examples/leadership/USER.md diff --git a/examples/leadership/agents/leadership/evals/ping.yaml b/examples/leadership/evals/ping.yaml similarity index 100% rename from examples/leadership/agents/leadership/evals/ping.yaml rename to examples/leadership/evals/ping.yaml diff --git a/examples/leadership/lobu.config.ts b/examples/leadership/lobu.config.ts index 248152779..e68853539 100644 --- a/examples/leadership/lobu.config.ts +++ b/examples/leadership/lobu.config.ts @@ -13,7 +13,7 @@ const leadership = defineAgent({ name: "leadership", description: "Help leadership teams turn memos, decisions, and board materials into reusable operating context", - dir: "./agents/leadership", + dir: ".", providers: [ { id: "anthropic", diff --git a/examples/leadership/tsconfig.json b/examples/leadership/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/leadership/tsconfig.json +++ b/examples/leadership/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/legal/agents/legal/IDENTITY.md b/examples/legal/IDENTITY.md similarity index 100% rename from examples/legal/agents/legal/IDENTITY.md rename to examples/legal/IDENTITY.md diff --git a/examples/legal/agents/legal/SOUL.md b/examples/legal/SOUL.md similarity index 100% rename from examples/legal/agents/legal/SOUL.md rename to examples/legal/SOUL.md diff --git a/examples/legal/agents/legal/USER.md b/examples/legal/USER.md similarity index 100% rename from examples/legal/agents/legal/USER.md rename to examples/legal/USER.md diff --git a/examples/legal/agents/legal/evals/ping.yaml b/examples/legal/evals/ping.yaml similarity index 100% rename from examples/legal/agents/legal/evals/ping.yaml rename to examples/legal/evals/ping.yaml diff --git a/examples/legal/lobu.config.ts b/examples/legal/lobu.config.ts index 8116a4d05..947af32af 100644 --- a/examples/legal/lobu.config.ts +++ b/examples/legal/lobu.config.ts @@ -13,7 +13,7 @@ const legalReview = defineAgent({ name: "legal-review", description: "Review contracts, summarize risk, and surface missing protections", - dir: "./agents/legal", + dir: ".", providers: [ { id: "anthropic", diff --git a/examples/legal/tsconfig.json b/examples/legal/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/legal/tsconfig.json +++ b/examples/legal/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/lobu-crm/agents/crm/IDENTITY.md b/examples/lobu-crm/IDENTITY.md similarity index 100% rename from examples/lobu-crm/agents/crm/IDENTITY.md rename to examples/lobu-crm/IDENTITY.md diff --git a/examples/lobu-crm/README.md b/examples/lobu-crm/README.md index 17e4a4266..156cc0159 100644 --- a/examples/lobu-crm/README.md +++ b/examples/lobu-crm/README.md @@ -6,16 +6,15 @@ Use this as a starting point for new projects. It shows every Lobu concept in on ## Structure ``` -lobu-crm/ +lobu-crm/ # single agent → dir: "." keeps it flat ├── lobu.config.ts # Agent, entities, relationships, watchers, connections, auth profiles +├── SOUL.md # Agent personality +├── IDENTITY.md # Agent identity +├── USER.md # User context ├── funnel-form.connector.ts # Custom connector (connectorFromFile) ├── inbound-triage.reaction.ts # Runs after watcher extraction ├── funnel-digest.reaction.ts # Runs after watcher extraction -└── agents/crm/ - ├── SOUL.md # Agent personality - ├── IDENTITY.md # Agent identity - ├── USER.md # User context - └── skills/crm-ops/SKILL.md # Agent skill (skillFromFile) +└── skills/crm-ops/SKILL.md # Agent skill (skillFromFile) ``` The built-in GitHub, X, Hacker News, and website connections are declared inline in diff --git a/examples/lobu-crm/agents/crm/SOUL.md b/examples/lobu-crm/SOUL.md similarity index 100% rename from examples/lobu-crm/agents/crm/SOUL.md rename to examples/lobu-crm/SOUL.md diff --git a/examples/lobu-crm/agents/crm/USER.md b/examples/lobu-crm/USER.md similarity index 100% rename from examples/lobu-crm/agents/crm/USER.md rename to examples/lobu-crm/USER.md diff --git a/examples/lobu-crm/lobu.config.ts b/examples/lobu-crm/lobu.config.ts index 1d57ba4d6..ebfcf3284 100644 --- a/examples/lobu-crm/lobu.config.ts +++ b/examples/lobu-crm/lobu.config.ts @@ -13,10 +13,11 @@ import { const crm = defineAgent({ id: "crm", + dir: ".", name: "crm", description: "Maintains Lobu's funnel CRM — leads, pilots, inbound triage, weekly digest", - skills: [skillFromFile("./agents/crm/skills/crm-ops")], + skills: [skillFromFile("./skills/crm-ops")], providers: [ { id: "z-ai", diff --git a/examples/lobu-crm/agents/crm/skills/crm-ops/SKILL.md b/examples/lobu-crm/skills/crm-ops/SKILL.md similarity index 100% rename from examples/lobu-crm/agents/crm/skills/crm-ops/SKILL.md rename to examples/lobu-crm/skills/crm-ops/SKILL.md diff --git a/examples/lobu-crm/tsconfig.json b/examples/lobu-crm/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/lobu-crm/tsconfig.json +++ b/examples/lobu-crm/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/market/lobu.config.ts b/examples/market/lobu.config.ts index e327fa1e8..330a4da9c 100644 --- a/examples/market/lobu.config.ts +++ b/examples/market/lobu.config.ts @@ -15,7 +15,7 @@ const vcTracking = defineAgent({ name: "vc-tracking", description: "Track companies, founders, and investment opportunities for venture firms", - dir: "./agents/vc-tracking", + dir: ".", providers: [ { id: "anthropic", diff --git a/examples/market/tsconfig.json b/examples/market/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/market/tsconfig.json +++ b/examples/market/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/office-bot/agents/food-ordering/IDENTITY.md b/examples/office-bot/IDENTITY.md similarity index 100% rename from examples/office-bot/agents/food-ordering/IDENTITY.md rename to examples/office-bot/IDENTITY.md diff --git a/examples/office-bot/agents/food-ordering/SOUL.md b/examples/office-bot/SOUL.md similarity index 100% rename from examples/office-bot/agents/food-ordering/SOUL.md rename to examples/office-bot/SOUL.md diff --git a/examples/office-bot/agents/food-ordering/USER.md b/examples/office-bot/USER.md similarity index 100% rename from examples/office-bot/agents/food-ordering/USER.md rename to examples/office-bot/USER.md diff --git a/examples/office-bot/agents/food-ordering/evals/lunch-flow.yaml b/examples/office-bot/evals/lunch-flow.yaml similarity index 100% rename from examples/office-bot/agents/food-ordering/evals/lunch-flow.yaml rename to examples/office-bot/evals/lunch-flow.yaml diff --git a/examples/office-bot/agents/food-ordering/evals/ping.yaml b/examples/office-bot/evals/ping.yaml similarity index 100% rename from examples/office-bot/agents/food-ordering/evals/ping.yaml rename to examples/office-bot/evals/ping.yaml diff --git a/examples/office-bot/lobu.config.ts b/examples/office-bot/lobu.config.ts index 7c6bc7c07..e4b165863 100644 --- a/examples/office-bot/lobu.config.ts +++ b/examples/office-bot/lobu.config.ts @@ -15,8 +15,8 @@ const foodOrdering = defineAgent({ name: "food-ordering", description: "Runs the office lunch order — presence check, recommendations, options poll, order collection, Deliveroo basket handoff", - dir: "./agents/food-ordering", - skills: [skillFromFile("./agents/food-ordering/skills/deliveroo-order")], + dir: ".", + skills: [skillFromFile("./skills/deliveroo-order")], providers: [ { id: "z-ai", diff --git a/examples/office-bot/agents/food-ordering/skills/deliveroo-order/SKILL.md b/examples/office-bot/skills/deliveroo-order/SKILL.md similarity index 100% rename from examples/office-bot/agents/food-ordering/skills/deliveroo-order/SKILL.md rename to examples/office-bot/skills/deliveroo-order/SKILL.md diff --git a/examples/office-bot/agents/food-ordering/skills/deliveroo-order/deliveroo.ts b/examples/office-bot/skills/deliveroo-order/deliveroo.ts similarity index 100% rename from examples/office-bot/agents/food-ordering/skills/deliveroo-order/deliveroo.ts rename to examples/office-bot/skills/deliveroo-order/deliveroo.ts diff --git a/examples/office-bot/tsconfig.json b/examples/office-bot/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/office-bot/tsconfig.json +++ b/examples/office-bot/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/personal-finance/agents/personal-finance/ASSEMBLY.md b/examples/personal-finance/ASSEMBLY.md similarity index 100% rename from examples/personal-finance/agents/personal-finance/ASSEMBLY.md rename to examples/personal-finance/ASSEMBLY.md diff --git a/examples/personal-finance/agents/personal-finance/IDENTITY.md b/examples/personal-finance/IDENTITY.md similarity index 100% rename from examples/personal-finance/agents/personal-finance/IDENTITY.md rename to examples/personal-finance/IDENTITY.md diff --git a/examples/personal-finance/agents/personal-finance/INGESTION.md b/examples/personal-finance/INGESTION.md similarity index 100% rename from examples/personal-finance/agents/personal-finance/INGESTION.md rename to examples/personal-finance/INGESTION.md diff --git a/examples/personal-finance/agents/personal-finance/SOUL.md b/examples/personal-finance/SOUL.md similarity index 100% rename from examples/personal-finance/agents/personal-finance/SOUL.md rename to examples/personal-finance/SOUL.md diff --git a/examples/personal-finance/agents/personal-finance/USER.md b/examples/personal-finance/USER.md similarity index 100% rename from examples/personal-finance/agents/personal-finance/USER.md rename to examples/personal-finance/USER.md diff --git a/examples/personal-finance/agents/personal-finance/evals/README.md b/examples/personal-finance/evals/README.md similarity index 100% rename from examples/personal-finance/agents/personal-finance/evals/README.md rename to examples/personal-finance/evals/README.md diff --git a/examples/personal-finance/agents/personal-finance/evals/promptfooconfig.yaml b/examples/personal-finance/evals/promptfooconfig.yaml similarity index 99% rename from examples/personal-finance/agents/personal-finance/evals/promptfooconfig.yaml rename to examples/personal-finance/evals/promptfooconfig.yaml index b718cce21..4c5e306a2 100644 --- a/examples/personal-finance/agents/personal-finance/evals/promptfooconfig.yaml +++ b/examples/personal-finance/evals/promptfooconfig.yaml @@ -3,7 +3,7 @@ # Quick start (from examples/personal-finance): # bun install # export LOBU_TOKEN=$(lobu token) -# bun run evals # promptfoo eval -c agents/personal-finance/evals/promptfooconfig.yaml +# bun run evals # promptfoo eval -c evals/promptfooconfig.yaml # bun run evals:view # comparison grid in the browser # # Single-turn tests use `vars.query` rendered through the prompt template. diff --git a/examples/personal-finance/lobu.config.ts b/examples/personal-finance/lobu.config.ts index 46f6ff4c7..328422cb0 100644 --- a/examples/personal-finance/lobu.config.ts +++ b/examples/personal-finance/lobu.config.ts @@ -9,6 +9,7 @@ import { const personal_finance = defineAgent({ id: "personal-finance", + dir: ".", name: "personal-finance", description: "Help individuals capture wages, expenses, savings, dividends, capital gains and pension contributions across the tax year and assemble a UK Self Assessment (SA100) return.", diff --git a/examples/personal-finance/package.json b/examples/personal-finance/package.json index c11d49c49..2e43d965b 100644 --- a/examples/personal-finance/package.json +++ b/examples/personal-finance/package.json @@ -5,7 +5,7 @@ "description": "Lobu example: personal-finance agent + promptfoo evals.", "type": "module", "scripts": { - "evals": "promptfoo eval -c agents/personal-finance/evals/promptfooconfig.yaml", + "evals": "promptfoo eval -c evals/promptfooconfig.yaml", "evals:view": "promptfoo view" }, "dependencies": { diff --git a/examples/personal-finance/tsconfig.json b/examples/personal-finance/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/personal-finance/tsconfig.json +++ b/examples/personal-finance/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/examples/sales/agents/sales/IDENTITY.md b/examples/sales/IDENTITY.md similarity index 100% rename from examples/sales/agents/sales/IDENTITY.md rename to examples/sales/IDENTITY.md diff --git a/examples/sales/agents/sales/SOUL.md b/examples/sales/SOUL.md similarity index 100% rename from examples/sales/agents/sales/SOUL.md rename to examples/sales/SOUL.md diff --git a/examples/sales/agents/sales/USER.md b/examples/sales/USER.md similarity index 100% rename from examples/sales/agents/sales/USER.md rename to examples/sales/USER.md diff --git a/examples/sales/agents/sales/evals/ping.yaml b/examples/sales/evals/ping.yaml similarity index 100% rename from examples/sales/agents/sales/evals/ping.yaml rename to examples/sales/evals/ping.yaml diff --git a/examples/sales/lobu.config.ts b/examples/sales/lobu.config.ts index c32db565b..544826e7c 100644 --- a/examples/sales/lobu.config.ts +++ b/examples/sales/lobu.config.ts @@ -13,7 +13,7 @@ const sales = defineAgent({ name: "sales", description: "Help revenue teams track account health, rollout progress, and renewal signals", - dir: "./agents/sales", + dir: ".", providers: [ { id: "anthropic", diff --git a/examples/sales/tsconfig.json b/examples/sales/tsconfig.json index a706088ce..b0037387c 100644 --- a/examples/sales/tsconfig.json +++ b/examples/sales/tsconfig.json @@ -7,10 +7,5 @@ "skipLibCheck": true, "noEmit": true }, - "include": [ - "lobu.config.ts", - "agents/**/*.ts", - "**/*.connector.ts", - "**/*.reaction.ts" - ] + "include": ["**/*.ts"] } diff --git a/packages/cli/README.md b/packages/cli/README.md index 18cf2eb0e..fa1f2a48c 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -32,7 +32,7 @@ docker run -d --name lobu-pg -p 5432:5432 \ - `lobu agent scaffold ` — add a second/third agent to an existing project. - `lobu telemetry {status,on,off}` — Sentry is off by default; toggle here. -> Note: Lobu's in-house YAML eval runner has been removed. Author evals with [promptfoo](https://www.promptfoo.dev) + `@lobu/promptfoo-provider`; see `examples/personal-finance/agents/personal-finance/evals/promptfooconfig.yaml` for the new pattern. +> Note: Lobu's in-house YAML eval runner has been removed. Author evals with [promptfoo](https://www.promptfoo.dev) + `@lobu/promptfoo-provider`; see `examples/personal-finance/evals/promptfooconfig.yaml` for the new pattern. ## License diff --git a/packages/landing/scripts/gen-landing-snippets.ts b/packages/landing/scripts/gen-landing-snippets.ts index 199fb70f7..1f6981982 100644 --- a/packages/landing/scripts/gen-landing-snippets.ts +++ b/packages/landing/scripts/gen-landing-snippets.ts @@ -55,7 +55,7 @@ const PINNED = { }, skill: { slug: "office-bot", - path: "agents/food-ordering/skills/deliveroo-order/SKILL.md", + path: "skills/deliveroo-order/SKILL.md", }, } as const; diff --git a/packages/landing/src/content/docs/guides/agent-prompts.md b/packages/landing/src/content/docs/guides/agent-prompts.md index 93da61b5f..42b84dfd1 100644 --- a/packages/landing/src/content/docs/guides/agent-prompts.md +++ b/packages/landing/src/content/docs/guides/agent-prompts.md @@ -3,7 +3,7 @@ title: Agent Workspace description: How agent files are organized across prompt files, local skills, evals, and lobu.config.ts. --- -Every Lobu agent has a workspace directory such as `agents/my-agent/`. `lobu.config.ts` points each agent at that directory with `dir: "./agents/my-agent"`. +Every Lobu agent has a workspace directory such as `agents/my-agent/`. `lobu.config.ts` points each agent at that directory with `dir: "./agents/my-agent"`. A **single-agent** project can set `dir: "."` to keep the prompt files at the project root instead (the bundled examples do this); multi-agent projects give each agent its own directory. The workspace contains the agent's prompt files plus any agent-local skills and evals. Operator-controlled configuration such as providers, connections, network policy, tool policy, and enabled registry skills lives in [`lobu.config.ts`](/reference/lobu-config/). diff --git a/packages/landing/src/content/docs/guides/evals.md b/packages/landing/src/content/docs/guides/evals.md index 03b8e9550..51a6f894b 100644 --- a/packages/landing/src/content/docs/guides/evals.md +++ b/packages/landing/src/content/docs/guides/evals.md @@ -97,7 +97,7 @@ Each row's fields become `vars` available as `{{var_name}}` substitutions in pro ## A worked example in the repo -The canonical reference is [`examples/personal-finance/agents/personal-finance/evals/promptfooconfig.yaml`](https://github.com/lobu-ai/lobu/blob/main/examples/personal-finance/agents/personal-finance/evals/promptfooconfig.yaml). It exercises a real agent with two single-turn evals — `ping` (persona check) and `tax-year-anchoring` (UK fiscal-year boundary — two independent cases). +The canonical reference is [`examples/personal-finance/evals/promptfooconfig.yaml`](https://github.com/lobu-ai/lobu/blob/main/examples/personal-finance/evals/promptfooconfig.yaml). It exercises a real agent with two single-turn evals: `ping` (persona check) and `tax-year-anchoring` (UK fiscal-year boundary, two independent cases). ## Known limitations diff --git a/packages/landing/src/generated/landing-snippets.json b/packages/landing/src/generated/landing-snippets.json index bead74382..2c4e19130 100644 --- a/packages/landing/src/generated/landing-snippets.json +++ b/packages/landing/src/generated/landing-snippets.json @@ -24,15 +24,15 @@ "language": "typescript" }, "agentConfig": { - "code": "import {\n connectorFromFile,\n defineAgent,\n defineConfig,\n defineEntityType,\n defineRelationshipType,\n defineWatcher,\n secret,\n} from \"@lobu/cli/config\";\n\nconst sales = defineAgent({\n id: \"sales\",\n name: \"sales\",\n description:\n \"Help revenue teams track account health, rollout progress, and renewal signals\",\n dir: \"./agents/sales\",\n providers: [\n {\n id: \"anthropic\",\n model: \"claude/sonnet-4-5\",\n key: secret(\"ANTHROPIC_API_KEY\"),\n },\n ],\n network: {\n allowed: [\n \"github.com\",\n \".github.com\",\n \".githubusercontent.com\",\n \"registry.npmjs.org\",\n \".npmjs.org\",\n ],\n },\n});", + "code": "import {\n connectorFromFile,\n defineAgent,\n defineConfig,\n defineEntityType,\n defineRelationshipType,\n defineWatcher,\n secret,\n} from \"@lobu/cli/config\";\n\nconst sales = defineAgent({\n id: \"sales\",\n name: \"sales\",\n description:\n \"Help revenue teams track account health, rollout progress, and renewal signals\",\n dir: \".\",\n providers: [\n {\n id: \"anthropic\",\n model: \"claude/sonnet-4-5\",\n key: secret(\"ANTHROPIC_API_KEY\"),\n },\n ],\n network: {\n allowed: [\n \"github.com\",\n \".github.com\",\n \".githubusercontent.com\",\n \"registry.npmjs.org\",\n \".npmjs.org\",\n ],\n },\n});", "path": "lobu.config.ts", "githubUrl": "https://github.com/lobu-ai/lobu/blob/main/examples/sales/lobu.config.ts", "language": "typescript" }, "skill": { "code": "---\nname: deliveroo-order\ndescription: Read a restaurant's Deliveroo menu and assemble a group-order basket for the office lunch. Use in step 2 of the lunch run, after orders are collected. Reading menus and building a basket is allowed; completing checkout or touching payment is NOT.\nnixPackages:\n - chromium\nnetwork:\n allow:\n - registry.npmjs.org\n - .npmjs.org\n judge:\n - domain: deliveroo.co.uk\n judge: deliveroo\n - domain: .deliveroo.co.uk\n judge: deliveroo\njudges:\n deliveroo: >\n Allow reads and basket changes. Deny checkout, payment,\n saved cards, address, or profile changes. Fail closed if unclear.\n---", - "path": "agents/food-ordering/skills/deliveroo-order/SKILL.md", - "githubUrl": "https://github.com/lobu-ai/lobu/blob/main/examples/office-bot/agents/food-ordering/skills/deliveroo-order/SKILL.md", + "path": "skills/deliveroo-order/SKILL.md", + "githubUrl": "https://github.com/lobu-ai/lobu/blob/main/examples/office-bot/skills/deliveroo-order/SKILL.md", "language": "markdown" }, "examples": [ diff --git a/skills/lobu/SKILL.md b/skills/lobu/SKILL.md index 09f7be7b9..6c7652163 100644 --- a/skills/lobu/SKILL.md +++ b/skills/lobu/SKILL.md @@ -90,7 +90,7 @@ If anything fails, do not silently move on — surface the error, propose a fix, 2. Read the active agent files under `agents//`. 3. Check local skills under `skills/` and `agents//skills/`. 4. Use `lobu validate` after config changes. -5. When prompt or behavior changes, run evals via promptfoo (see `examples/personal-finance/agents/personal-finance/evals/promptfooconfig.yaml`). The in-house `lobu eval` command has been removed. +5. When prompt or behavior changes, run evals via promptfoo (see `examples/personal-finance/evals/promptfooconfig.yaml`). The in-house `lobu eval` command has been removed. ## Common Commands