Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
ts 34 lines 1.21 KB
Raw
1 /**
2 * The system prompt of every journey: the `composio-cli` skill, built from its
3 * source the way `pnpm --filter @composio/cli run build:skills` builds it.
4 *
5 * Rendering it here, not reading a checked-in copy, is what makes a change to
6 * the skill reach these tests.
7 */
8
9 import {
10 renderComposioCliSkill,
11 renderReferenceFiles,
12 } from '../../../../packages/cli/skills-src/composio-cli/index';
13
14 /** Where the skill's files sit inside the journey container. */
15 export const SKILL_DIRECTORY = '/skills/composio-cli';
16
17 export interface BuiltSkill {
18 /** `SKILL.md`, as an agent host loads it. */
19 readonly skillMarkdown: string;
20 /** `references/<name>.md`, which `SKILL.md` tells the agent to open when needed. */
21 readonly references: Readonly<Record<string, string>>;
22 }
23
24 export const buildSkill = (): BuiltSkill => ({
25 skillMarkdown: renderComposioCliSkill('stable'),
26 references: renderReferenceFiles('stable'),
27 });
28
29 /**
30 * The skill text with the one line an agent host adds when it loads a skill:
31 * where its files are, so the relative links in `SKILL.md` can be followed.
32 */
33 export const systemPrompt = (skill: BuiltSkill): string =>
34 `Base directory for this skill: ${SKILL_DIRECTORY}\n\n${skill.skillMarkdown}`;