Patterns
Organize Context Spaces, sources, and skills in a .NET application.
Keep Context Spaces close to the domain they describe.
For a real application, create a folder that defines the Context Space and contains local source material if you use file-system sources.
Recommended project layout
For the travel sample:
Travel is only the sample domain. The pattern is the important part.
Keep Program.cs small
The Context Space definition owns the source and skill wiring. Program.cs only registers it.
Split knowledge and behavior
| Put this in sources | Put this in skills |
|---|---|
| Product docs | How to answer product support questions. |
| Policies | How to compare a request against policy. |
| City guides | How to structure a practical itinerary. |
| Runbooks | How to summarize incident response steps. |
| Release notes | How to explain changes to different audiences. |
Sources are content. Skills are instructions.
Attach narrowly
Not every agent needs every Context Space.
| Agent | Attach |
|---|---|
| Support Agent | product-support |
| Billing Agent | billing-policy |
| Travel Agent | travel-planning |
| Plain Agent | No Context Space |
This makes dashboard behavior easier to reason about. If an agent should not use a knowledge boundary, do not attach it.
Common mistakes
| Mistake | Better approach |
|---|---|
| Treating Context Spaces as only file storage. | Treat them as runtime context boundaries with sources, skills, metadata, and dashboard visibility. |
| Putting all knowledge into agent instructions. | Put content in sources and behavior in skills. |
| Using skills as document dumps. | Keep skills as reusable operational guidance. |
| Attaching every Context Space to every agent. | Attach only the context each agent should use. |
| Assuming source names mean content was read. | The agent should only claim source content when relevant excerpts are retrieved. |
Good fits beyond travel
| Domain | Context Space examples |
|---|---|
| Customer support | Help articles, refund policy, escalation skill. |
| Developer tools | API docs, migration guides, code review skill. |
| Finance operations | Expense policy, approval rules, audit response skill. |
| Healthcare admin | Procedure docs, intake rules, compliance response skill. |
| Internal IT | Runbooks, outage history, incident summary skill. |
| Sales engineering | Product docs, objection handling skill, pricing notes. |
Context Spaces are a framework feature for grounded agent behavior, not a travel-planning feature.