# FluidContext Agent Guide

FluidContext is a place to put durable context while working with an AI.
If a user says "put this in FluidContext" or gives you this URL, use the API
below. Defaults are `org_id=local` and `kb_id=starter` unless the user gives
different names.

## Fast Path

1. Check the service:

```bash
curl -s https://context.fluid.ai/health
```

2. Open or create the default knowledgebase:

```bash
curl -s -X POST https://context.fluid.ai/orgs/local/knowledgebases/starter
```

3. Upload source markdown or text and let FluidContext organize it:

```bash
curl -s -X POST \
  https://context.fluid.ai/orgs/local/knowledgebases/starter/documents/upload-and-process \
  -F 'file=@context.md;type=text/markdown'
```

For content you only have in memory:

```bash
printf '%s\n' '# Context\n\nPaste the user content here.' | \
  curl -s -X POST \
    https://context.fluid.ai/orgs/local/knowledgebases/starter/documents/upload-and-process \
    -F 'file=@-;filename=context.md;type=text/markdown'
```

4. Verify with search:

```bash
curl -s 'https://context.fluid.ai/orgs/local/knowledgebases/starter/search?q=distinctive%20phrase'
```

## Discovery

- Machine-readable service description: `https://context.fluid.ai/.well-known/fluidcontext`
- MCP Streamable HTTP endpoint: `https://context.fluid.ai/mcp`
- Downloadable skill: `https://context.fluid.ai/skills/fluidcontext-content/SKILL.md`
- Tree: `https://context.fluid.ai/orgs/local/knowledgebases/starter/tree?depth=4`
- Schema: `https://context.fluid.ai/orgs/local/knowledgebases/starter/schema`

Prefer `documents/upload-and-process` for normal user-provided material. Use
direct document upload only when the user gives you an already-finished markdown
file with a known final path.
