> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heyhumm.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Context Management via API

> Use the Humm API to review and update memories, ontology, and commands with a safe preview-and-apply workflow.

If you already use the Humm API, the simplest way to manage business context programmatically is to work directly with the existing Memories, Ontology, and Commands endpoints.

This is the recommended path if you want to:

* Sync context from your own systems
* Let an AI assistant help draft updates
* Build repeatable internal workflows without waiting on new product features

## API vs. MCP

Use the API when you want to **change** business context.

Use the [Humm MCP Server](./humm-mcp-server) when you want to **query** Humm from an AI assistant.

<CardGroup cols={2}>
  <Card title="Use the API">
    Read, diff, approve, and apply updates to memories, ontology, and commands.
  </Card>

  <Card title="Use MCP">
    Explore data sources, search context, and run Humm queries from Claude, ChatGPT, or another MCP client.
  </Card>
</CardGroup>

## Recommended Workflow

For all context changes, follow the same pattern:

1. Fetch the current resource
2. Draft the proposed change locally
3. Show a diff or summary for human review
4. Apply the write only after approval
5. Re-fetch the resource and verify the result

<Note>
  Humm recommends a preview-and-approve step before any write, even if you automate the rest of the workflow.
</Note>

## Guides

* [Manage Memories via API](./manage-memories-via-api)
* [Manage Ontology via API](./manage-ontology-via-api)
* [Manage Commands via API](./manage-commands-via-api)

## Using an AI Assistant

You do not need a Humm-specific plugin for these workflows. Give your assistant:

* Your API base URLs
* A bearer token or PAT
* The workflow you want it to follow
* A requirement to preview changes before applying them

<Note>
  If your assistant runs shell commands for you, make sure your token is available
  to non-interactive shells. For example, export `HUMM_PAT` from `~/.zshenv` for
  zsh or `~/.bash_profile` for bash, rather than only from an interactive shell
  profile.
</Note>

Example prompt:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Use the Humm API to update our business context.

Rules:
- Resolve the correct organization before making any request
- Fetch the current resource before proposing edits
- Save the current version locally so you can compare before and after
- Make surgical changes only; preserve structure, naming, and unchanged content
- Show me the exact diff or changed content plus a short summary of what changed
- Do not apply the write until I approve it
- After applying the write, re-fetch the resource and verify the updated state
```

## Next Steps

Start with the guide that matches the resource you want to manage:

* [Memories](./manage-memories-via-api)
* [Ontology](./manage-ontology-via-api)
* [Commands](./manage-commands-via-api)
