Agent with skills
Example OrchaJS agent that loads specialized skill instructions only when they are relevant.
01{02 "name": "technical_explanation",03 "description": "Explain a technical concept with a practical example.",04 "triggers": [05 "The user asks how a technical concept works.",06 "The user asks for a practical engineering example."07 ]08}Focused knowledge, loaded on demand
This example is a complete technical writing agent with one skill for explaining engineering concepts. The base agent stays small. It initially sees only the skill's name, description, and triggers.
When a request matches, the model loads the full procedure through Orcha's
internal load_skill tool. Orcha continues the same run automatically, and
the loaded instructions remain active for the durable session.
A skill is the right fit for policy, process, domain knowledge, or a repeatable method. It guides the model but does not execute code.
Select any file in the editor to inspect the complete standalone project.
Understand each file
orcha/writingAgent/skills/technicalExplanation/index.json
Provides the small discovery card the model sees before loading the skill.
- name is the model-facing skill identifier.
- description says what the skill helps with.
- triggers describe situations in which it should be loaded.
orcha/writingAgent/skills/technicalExplanation/instructions.md
Contains the complete procedure, loaded only when the model chooses this skill.
- Loaded instructions remain active for the durable session.
- A skill adds guidance; it does not execute application code.
orcha/writingAgent/index.json
Configures the writing agent and its model.
orcha/writingAgent/instructions.md
Defines the base behavior that is always present before any skill is loaded.
orcha/index.ts
Configures the provider and registers writingAgent. Skill folders are discovered automatically.
app.ts
Runs a request that matches the skill's triggers and prints the completed response.