1.2.0 introduced /api/v2 as the canonical, cloud-aligned prefix and mounted every business router twice, but the user-facing entry points (README, README.zh-CN, QUICKSTART, the docs/ set, the Langfuse example) still taught /api/v1 — so new users were pointed at the compatibility alias while docs/api.md already declared v2 canonical. - Switch every EverOS endpoint reference in docs, examples, and `everos demo --live` to /api/v2, plus the matching CLI test expectations. - Describe /api/v1 as a legacy compatibility alias that may be removed in a future major release, rather than a permanent one. Nothing changes at runtime: both prefixes still resolve to the same handlers and the v1/v2 parity test is untouched. - Add a short note in README / README.zh-CN / QUICKSTART so existing v1 integrations know they keep working. - Fix the five dead endpoint anchors in the docs/api.md table of contents, which still pointed at the pre-1.2.0 #post-apiv1... slugs. Left on v1 deliberately: docs/migration-to-1.0.0.md (historical record), CHANGELOG history, tests/** (v1 must stay covered), and the use-cases/claude-code-plugin + openher READMEs, which document a different cloud API. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
299 lines
9.6 KiB
Markdown
299 lines
9.6 KiB
Markdown
# Quickstart
|
|
|
|
> Five minutes from zero to "I added a conversation, queried it back, and
|
|
> can read it as plain Markdown."
|
|
|
|
EverOS runs as a **service** — start the server, then call the HTTP API.
|
|
There is no in-process library mode; an `everos` server is always in
|
|
front of your agent.
|
|
|
|
## Prerequisites
|
|
|
|
- **Python 3.12+**
|
|
- **API keys** for three capabilities: a chat LLM (memory extraction),
|
|
an embedding model (vector retrieval), and a reranker. Any
|
|
OpenAI-compatible endpoint works.
|
|
|
|
## 1. Install
|
|
|
|
**From PyPI** (users):
|
|
|
|
```bash
|
|
pip install everos
|
|
# or: uv pip install everos
|
|
```
|
|
|
|
**From source** (contributors / developers):
|
|
|
|
```bash
|
|
git clone https://github.com/EverMind-AI/EverOS.git
|
|
cd EverOS
|
|
uv sync # install all deps into .venv
|
|
```
|
|
|
|
> **Note:** source install creates a `.venv` virtualenv. Subsequent
|
|
> `everos` commands need either `uv run everos ...` or activate the venv
|
|
> first (`source .venv/bin/activate`).
|
|
|
|
## 2. Configure
|
|
|
|
```bash
|
|
everos init # default root: ~/.everos
|
|
everos init --root /data/everos # or specify a custom root
|
|
```
|
|
|
|
> **Root directory** — defaults to `~/.everos`. Use `--root <path>` to
|
|
> relocate; all subsequent commands (`server start`, `cascade status`,
|
|
> etc.) must use the matching `--root`. Any setting in `everos.toml` can
|
|
> also be overridden via `EVEROS_*` environment variables for containers
|
|
> and CI.
|
|
|
|
This creates `everos.toml` and `ome.toml` under the root directory.
|
|
Open `everos.toml` and fill in three sections — here's the minimum
|
|
viable config:
|
|
|
|
```toml
|
|
[llm]
|
|
model = "gpt-4.1-mini" # or your preferred model
|
|
base_url = "https://openrouter.ai/api/v1" # any OpenAI-compatible endpoint
|
|
api_key = "sk-..." # your API key
|
|
|
|
[embedding]
|
|
model = "Qwen/Qwen3-Embedding-4B"
|
|
base_url = "https://api.deepinfra.com/v1/openai"
|
|
api_key = "..."
|
|
|
|
[rerank]
|
|
provider = "deepinfra"
|
|
model = "Qwen/Qwen3-Reranker-4B"
|
|
base_url = "https://api.deepinfra.com/v1/inference"
|
|
api_key = "..."
|
|
```
|
|
|
|
The generated file pre-fills recommended `model` and `base_url`
|
|
defaults — just drop in your API keys. Any OpenAI-compatible endpoint
|
|
works.
|
|
|
|
> **Multimodal** (`[multimodal]`) is optional — only needed when
|
|
> ingesting image / pdf / audio content items. See
|
|
> [docs/multimodal.md](docs/multimodal.md) for setup.
|
|
|
|
|
|
## 3. Start the server
|
|
|
|
Check your file descriptor limit — EverOS opens many LanceDB segment
|
|
files under concurrent search + indexing. Platform defaults:
|
|
**macOS 256** · **Linux 1024** · **Windows 8192**. If yours is below
|
|
4096, raise it before starting:
|
|
|
|
Run these in the **same terminal** where you will start the server —
|
|
`ulimit` is per-shell-session, not global:
|
|
|
|
```bash
|
|
ulimit -n # check current limit
|
|
ulimit -n 4096 # raise if needed
|
|
everos server start [--root <path>] # must be in the same session
|
|
```
|
|
|
|
> **No side effects** — `ulimit -n` only raises the per-process ceiling.
|
|
> It does not pre-allocate memory or file handles, and has zero
|
|
> performance cost. For Linux production, set `LimitNOFILE=65536` in
|
|
> your systemd unit file.
|
|
|
|
You should see:
|
|
|
|
```
|
|
starting everos on 127.0.0.1:8000
|
|
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
|
|
```
|
|
|
|
The server runs in the foreground. **Open a second terminal** for the
|
|
steps below.
|
|
|
|
Verify it's up:
|
|
|
|
```bash
|
|
curl http://127.0.0.1:8000/health
|
|
# {"status":"ok"}
|
|
```
|
|
|
|
## 4. Add a conversation
|
|
|
|
Send messages to the server — one at a time or in batches. Each batch
|
|
belongs to a `session_id`, which represents one conversation thread.
|
|
Timestamps are Unix epoch in **milliseconds** (UTC).
|
|
|
|
> [!NOTE]
|
|
> Business endpoints live under `/api/v2`. The older `/api/v1` prefix still
|
|
> resolves to the same handlers so existing integrations keep working, but it
|
|
> is a legacy alias that may be removed in a future major release — write new
|
|
> code against `/api/v2`.
|
|
|
|
First, a chat about climbing:
|
|
|
|
```bash
|
|
TS=$(($(date +%s)*1000))
|
|
curl -X POST http://127.0.0.1:8000/api/v2/memory/add \
|
|
-H 'Content-Type: application/json' \
|
|
-d "{
|
|
\"session_id\": \"demo-001\",
|
|
\"messages\": [
|
|
{\"sender_id\": \"alice\", \"role\": \"user\", \"timestamp\": $TS, \"content\": \"I just got back from a week in Yosemite. The climbing was incredible.\"},
|
|
{\"sender_id\": \"agent1\", \"role\": \"assistant\", \"timestamp\": $((TS+10000)), \"content\": \"That sounds amazing! Which routes did you do?\"},
|
|
{\"sender_id\": \"alice\", \"role\": \"user\", \"timestamp\": $((TS+20000)), \"content\": \"Mostly cracks on El Cap. I go every spring — it's my favorite season there.\"}
|
|
]
|
|
}"
|
|
# → status: "accumulated"
|
|
```
|
|
|
|
Now the topic shifts to work:
|
|
|
|
```bash
|
|
curl -X POST http://127.0.0.1:8000/api/v2/memory/add \
|
|
-H 'Content-Type: application/json' \
|
|
-d "{
|
|
\"session_id\": \"demo-001\",
|
|
\"messages\": [
|
|
{\"sender_id\": \"alice\", \"role\": \"user\", \"timestamp\": $((TS+60000)), \"content\": \"By the way, I switched to biking to work last month. Loving it so far.\"},
|
|
{\"sender_id\": \"agent1\", \"role\": \"assistant\", \"timestamp\": $((TS+70000)), \"content\": \"How long is your commute?\"},
|
|
{\"sender_id\": \"alice\", \"role\": \"user\", \"timestamp\": $((TS+80000)), \"content\": \"About 25 minutes. I stop at Blue Bottle in SOMA for coffee most mornings.\"}
|
|
]
|
|
}"
|
|
```
|
|
|
|
Response:
|
|
|
|
```json
|
|
{
|
|
"data": {
|
|
"message_count": 3,
|
|
"status": "extracted"
|
|
}
|
|
}
|
|
```
|
|
|
|
EverOS detected a topic shift (climbing → commute) and automatically
|
|
extracted the earlier conversation into memory.
|
|
|
|
The `status` field tells you what happened:
|
|
|
|
| Status | Meaning |
|
|
|---|---|
|
|
| `accumulated` | Messages buffered, still part of the same topic. |
|
|
| `extracted` | Topic shift detected — memory extracted from the buffer. |
|
|
|
|
> For the full API contract, see [docs/openapi.json](docs/openapi.json).
|
|
|
|
## 5. Flush (manual extraction)
|
|
|
|
If you want to extract memory without waiting for a topic shift — for
|
|
example at the end of a session — call `/flush`:
|
|
|
|
```bash
|
|
curl -X POST http://127.0.0.1:8000/api/v2/memory/flush \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"session_id":"demo-001"}'
|
|
```
|
|
|
|
```json
|
|
{
|
|
"data": {
|
|
"status": "extracted"
|
|
}
|
|
}
|
|
```
|
|
|
|
This forces extraction of whatever is still in the buffer.
|
|
|
|
## 6. Search
|
|
|
|
```bash
|
|
curl -X POST http://127.0.0.1:8000/api/v2/memory/search \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{
|
|
"user_id": "alice",
|
|
"query": "Where do I like to climb?",
|
|
"top_k": 5
|
|
}'
|
|
```
|
|
|
|
Response (trimmed):
|
|
|
|
```json
|
|
{
|
|
"data": {
|
|
"episodes": [
|
|
{
|
|
"id": "alice_ep_20260528_00000002",
|
|
"summary": "... Alice shared that she loves climbing in Yosemite every spring ...",
|
|
"score": 0.628,
|
|
"atomic_facts": [
|
|
{
|
|
"content": "Alice said she loves climbing in Yosemite every spring.",
|
|
"score": 0.628
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
```
|
|
|
|
Hybrid retrieval (BM25 + vector + scalar) returns the matching episode
|
|
with its atomic facts nested under it.
|
|
|
|
## 7. Your memory is just Markdown
|
|
|
|
This is what makes EverOS different — memory persists as plain Markdown:
|
|
|
|
```
|
|
<root>/ ← ~/.everos or your --root path
|
|
├── default_app/ ← app_id ("default" → "default_app")
|
|
│ └── default_project/ ← project_id ("default" → "default_project")
|
|
│ ├── users/<user_id>/
|
|
│ │ ├── user.md ← profile
|
|
│ │ ├── episodes/ ← daily-log episodes
|
|
│ │ ├── .atomic_facts/ ← nested facts (dot-hidden)
|
|
│ │ └── .foresights/ ← predictive memory (dot-hidden)
|
|
│ ├── agents/<agent_id>/
|
|
│ │ ├── agent.md
|
|
│ │ ├── .cases/ ← task cases
|
|
│ │ └── skills/ ← procedural memories
|
|
│ └── knowledge/ ← shared knowledge base
|
|
├── everos.toml ← provider config
|
|
├── ome.toml ← strategy config (hot-reloaded)
|
|
├── .index/ ← derived indexes (rebuildable from md)
|
|
│ ├── sqlite/system.db
|
|
│ └── lancedb/
|
|
└── .tmp/
|
|
```
|
|
|
|
Every memory entry is a plain Markdown file you can directly read and
|
|
edit — no database driver needed.
|
|
|
|
## Stopping the server
|
|
|
|
`Ctrl+C` in the server terminal.
|
|
|
|
## Next steps
|
|
|
|
- **Integrate into your agent** — wrap `/add`, `/flush`, `/search` in a
|
|
thin HTTP client and call them from your agent loop.
|
|
- **App + project scope** — pass `app_id` / `project_id` in your API
|
|
requests to partition memory spaces inside one server (defaults to
|
|
`"default"` when omitted).
|
|
- **Knowledge base** — upload documents via
|
|
`/api/v2/knowledge/documents` and search with hybrid retrieval. See
|
|
[docs/knowledge.md](docs/knowledge.md).
|
|
- **Reflection** — offline memory consolidation; enable in `ome.toml`.
|
|
See [docs/reflection.md](docs/reflection.md).
|
|
- **Multimodal** — ingest image / pdf / audio / office documents. See
|
|
[docs/multimodal.md](docs/multimodal.md).
|
|
- **Search modes** — four methods (`HYBRID` / `KEYWORD` / `VECTOR` /
|
|
`AGENTIC`) with a filter DSL. See [docs/openapi.json](docs/openapi.json)
|
|
for the full API schema.
|
|
- **Architecture** — [docs/architecture.md](docs/architecture.md) for
|
|
DDD layering; [docs/storage_layout.md](docs/storage_layout.md) for
|
|
on-disk layout.
|
|
- **Found a bug?** — [open an issue](CONTRIBUTING.md).
|