# Solutions

Solutions are high-level containers that group related agents, knowledge bases, and content sources into a cohesive unit. They provide a single place to manage all the resources that work together to solve a particular business problem.

## What are Solutions?

A solution brings together:

- **Agents** — AI workflows that process information and generate outputs
- **Knowledge Bases** — Collections of indexed content for semantic retrieval
- **Content Sources** — RSS feeds, websites, and files that supply raw data

By grouping these resources under one solution, you get a clear overview of how they relate and can manage them as a unit rather than individually.

## Creating a Solution

### Via the App

1. Navigate to **Solutions** in your account
2. Click **Create Solution**
3. Provide a **name** and optional **description**
4. Save the solution
5. Link existing agents, knowledge bases, and content sources from the solution detail page

### Via the API

Create and manage solutions programmatically using the REST API:

```bash
curl -X POST https://api.seclai.com/solutions \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Solution", "description": "Groups my production resources"}'
```

See [API Examples](https://seclai.com/docs/api-examples) for complete code samples including linking resources and using AI assistants.

## Linking Resources

After creating a solution you can link and unlink agents, knowledge bases, and content sources at any time. Linking is non-destructive — the underlying resources remain independent and can belong to multiple solutions simultaneously.

| Action                     | Description                                        |
| -------------------------- | -------------------------------------------------- |
| **Link Agents**            | Associate one or more agents with the solution     |
| **Unlink Agents**          | Remove the association without deleting the agent  |
| **Link Knowledge Bases**   | Associate knowledge bases with the solution        |
| **Unlink Knowledge Bases** | Remove the association without deleting the KB     |
| **Link Content Sources**   | Associate content sources with the solution        |
| **Unlink Content Sources** | Remove the association without deleting the source |

## AI Assistants

Solutions include three built-in AI assistants that help you configure and optimise your setup. All assistants follow a **propose-then-accept** pattern: you describe what you want in natural language, the assistant generates a plan of specific actions, and you review and accept or decline. The assistant never makes changes without your approval.

### Source AI Assistant

Analyses your solution and suggests new content sources to add.

**Access:** Solution detail page → Sources tab → **AI Assistant**.

Describe the kind of data you need and the assistant will recommend RSS feeds, websites, or other sources and can create them for you once you accept.

**Example prompts:**

- "Find RSS feeds for AI and machine learning news"
- "Add the company blog at blog.example.com as a source"
- "I need product documentation sources for our developer portal"

**MCP tool:** `generate_source_plan`

### Knowledge Base AI Assistant

Helps organise content into knowledge bases.

**Access:** Solution detail page → Knowledge Bases tab → **AI Assistant**.

It analyses your existing sources and suggests logical groupings, creates new knowledge bases, and links them to your solution.

**Example prompts:**

- "Group my sources into knowledge bases by topic"
- "Create a knowledge base for all my product documentation sources"
- "I have 15 news sources — should they be one KB or several?"

**MCP tool:** `generate_kb_plan`

### Solution AI Assistant

Provides holistic recommendations for your entire solution — from creating new resources to restructuring existing ones.

**Access:** Solution detail page → **AI Assistant** button.

**What it can do:**

- Review your current setup and suggest improvements
- Add new resources (sources, KBs, agents) to fill gaps
- Restructure knowledge bases for better retrieval quality
- Recommend configuration changes across multiple resources

**Example prompts:**

- "Review my solution and suggest improvements"
- "Add a customer FAQ knowledge base with relevant sources and an agent to answer questions"
- "Reorganise my sources — group product docs into one KB and news into another"

**MCP tools:** `generate_solution_plan` / `accept_solution_plan` / `decline_solution_plan`

**Tips:** Use the Solution Assistant when you need cross-resource changes. For focused single-resource tasks, the Source or KB assistant is faster. For general best practices on getting the most from all AI assistants, see [AI Assistant Best Practices](https://seclai.com/docs/ai-assistants#best-practices).

## MCP Tools

All solution operations are also available as MCP tools, allowing AI coding assistants and other MCP-compatible clients to manage solutions on your behalf. See the [MCP Server](https://seclai.com/docs/mcp) documentation for the full list of solution tools.

## Exporting

Export a solution's full configuration — including linked agents, knowledge bases, content sources, and memory banks — as a downloadable JSON file. Optionally include the content from all linked knowledge bases and memory banks.

- **UI:** Open the solution detail page and click the **Export** button. If content inclusion is available, you'll see an estimate of the export size before confirming.
- **API:** `POST /authenticated/resource-exports` with `resource_type: "solution"` and the solution ID.
- **MCP:** Use the `create_resource_export` tool with `resource_type: "solution"`.

See [Export Formats → Solution](https://seclai.com/docs/export-formats#solution) for the full file schema and available options.

## Next Steps

- [Agents](https://seclai.com/docs/agents) — Learn about the agents you can link to solutions
- [Knowledge Bases](https://seclai.com/docs/knowledge-bases) — Understand how knowledge bases index content
- [Content Sources](https://seclai.com/docs/content-sources) — Explore the types of content sources available
- [API Examples](https://seclai.com/docs/api-examples) — Complete API code samples for solutions
- [MCP Server](https://seclai.com/docs/mcp) — Use MCP tools to manage solutions programmatically
