ibexharness
DocsBlogReleasesRoadmap
GitHub
ibexharness

Documentation

IntroductionQuickstart (5 minutes)ConceptsFAQ
Getting Started›Concepts
Getting Started

Concepts

Core ideas behind the proxy, auth service, and agent memory model.

IBEX Harness separates who is calling (organization + agent), what they may do (permissions), and where requests go (proxy routing). Understanding these three axes is enough to integrate against Phase 1 — memory, context assembly, and provider forwarding build on the same identity model later.

Phase 1 scope

Phase 1 delivers auth + proxy only. Memory injection, vector search, and LLM provider forwarding are planned — not available. See current state.

Platform vocabulary

TermMeaningPhase 1
OrganizationTop-level tenant; owns agents, tokens, rate limitsActive — glossary
AgentAutonomous actor inside an org; identified per requestActive
PATPersonal Access Token — ibex_pat_* bearer credentialActive
RLSPostgres row-level security isolating tenant rowsActive
ProxyHTTP edge — auth, validate, rate limit, (future) forwardActive (no forward)
MemoryPersistent agent knowledge storeNot shipped
DirectiveBehavioral instructions injected into LLM contextNot shipped

Core entities

1

Organization

Every token belongs to exactly one organization (org_id). Rate limits, RLS policies, and future billing boundaries scope per org. Table: ibex_core.organizations.

2

Agent

An agent is an autonomous actor inside an org. The proxy requires X-IBEX-Agent-ID on protected routes and validates it via auth gRPC ValidateAgent.

3

Token (PAT)

Clients authenticate with a Personal Access Token. The proxy calls ValidateToken; Argon2id verifies the secret server-side. Permissions are a 64-bit bitmap (ADR-0009).

4

User

Human operator linked to org membership. Phase 1 uses users for token audit trails; dashboard login is future work.

Entity relationships: Org and project model and Data model.

Request path (Phase 1)

Mermaid diagram: sequenceDiagram
+--------+                                     +-------+                            +------+    +-------+   
| Client |                                     | Proxy |                            | Auth |    | Redis |   
+--------+                                     +-------+                            +------+    +-------+   
     |                                             |                                    |           |       
     |  Bearer PAT + X-IBEX-Agent-ID + JSON body   |                                    |           |       
     |--------------------------------------------->                                    |           |       
     |                                             |                                    |           |       
     |                                             |           ValidateToken            |           |       
     |                                             |------------------------------------>           |       
     |                                             |                                    |           |       
     |                                             |        org_id, permissions         |           |       
     |                                             <....................................|           |       
     |                                             |                                    |           |       
     |                                             |  ValidateAgent(org_id, agent_id)   |           |       
     |                                             |------------------------------------>           |       
     |                                             |                                    |           |       
     |                                             |            authorized              |           |       
     |                                             <....................................|           |       
     |                                             |                                    |           |       
     |                                             |               rate limit check     |           |       
     |                                             |------------------------------------------------>       
     |                                             |                                    |           |       
     |                                             |               allowed / denied     |           |       
     |                                             <................................................|       
     |                                             |                                    |           |       
     |    501 PROVIDER_NOT_CONFIGURED (Phase 1)    |                                    |           |       
     <.............................................|                                    |           |       
     |                                             |                                    |           |       
+--------+                                     +-------+                            +------+    +-------+   
| Client |                                     | Proxy |                            | Auth |    | Redis |   
+--------+                                     +-------+                            +------+    +-------+   

Full lifecycle documentation: Request lifecycle.

Required headers

Protected proxy routes require:

Authorization: Bearer ibex_pat_<uuid>_<secret>
X-IBEX-Agent-ID: <agent-uuid>
Content-Type: application/json   # POST bodies only
bash
curl -X POST http://localhost:8080/v1/chat/completions \
  -H "Authorization: Bearer ${IBEX_DEV_TOKEN}" \
  -H "X-IBEX-Agent-ID: ${IBEX_DEV_AGENT_ID}" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"ping"}]}'

Phase 1 expected response: HTTP 501 with PROVIDER_NOT_CONFIGURED — auth, agent verify, rate limit, and validation succeeded.

Org from token

Chat uses POST /v1/chat/completions without {org_id} in the URL. Tenant scope comes from the PAT, not the path.

Permission model

Permissions are bitwise flags on the token. Integrators need at minimum:

PermissionRequired for
ProxyChatCompletionChat completion endpoint
TokenCreateIssuing new PATs via gRPC

Admin seed tokens include broader bits for local development. Production tokens should follow least privilege — Authentication.

Error envelope

All JSON errors share a stable shape:

JSON
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded",
    "request_id": "0192a3b4-c5d6-7890-abcd-ef1234567890"
  }
}

Semantic validation adds field_errors[]. Use request_id to correlate with proxy and auth logs. Reference: API errors.

Multi-tenancy principles

1

org_id from token

Never trust org_id from request body or unvalidated URL segments.

2

403 not 404

Cross-tenant access returns Forbidden — ambiguous to attackers.

3

Defense in depth

Middleware, gRPC, store WHERE clauses, and Postgres RLS all enforce isolation.

4

Redis namespacing

Keys include org_id as the second segment — ratelimit:{org_id}:...

Details: Tenant isolation and Multi-tenant RLS.

Future concepts (not yet available)

The architecture doc describes services that do not run in Phase 1:

  • Context assembly — parallel directive + memory retrieval (40ms budget)
  • Memory service — vector search, dedup, conflict detection
  • Embedder — text-to-vector for semantic recall
  • Worker — async extraction, fingerprinting, drift detection

Treat these as design targets when reading Architecture overview — not integration endpoints.

Mental model summary

Mermaid diagram: flowchart LR
+---------------+     +-------+               +------------------+     +-----------+
|               |     |       |               |                  |     |           |
|               |     |       |               |                  |     |           |
|     Client    |---->| Proxy |     --gRPC--->|       Auth       |---->|  Postgres |
| (PAT + Agent) |     |       |               |                  |     | SQL + RLS |
|               |     |       |               |                  |     |           |
+---------------+     +-------+               +------------------+     +-----------+
                          :                                                         
                          :                                                         
                          :                                                         
                          :                                                         
                          :                                                         
                          :                   +------------------+                  
                          :                   |                  |                  
                          :                   |                  |                  
                          +------------------>|      Redis       |                  
                          :                   |   rate limits    |                  
                          :                   |                  |                  
                          :                   +------------------+                  
                          :                                                         
                          :                                                         
                          :                                                         
                          :                                                         
                          :                                                         
                          :                   +------------------+                  
                          :                   |                  |                  
                          +......Phase.2.....>|   LLM provider   |                  
                          :                   |                  |                  
                          :                   +------------------+                  
                          :                                                         
                          :                                                         
                          :                                                         
                          :                                                         
                          :                                                         
                          :                   +------------------+                  
                          :                   |                  |                  
                          +.....Phase.3+.....>| Memory / Context |                  
                                              |                  |                  
                                              +------------------+                  

Related guides

  • Introduction — what works today vs roadmap
  • Quickstart — five-minute local setup
  • Auth overview — gRPC surface
  • Proxy overview — middleware and endpoints
  • Glossary — term definitions

Was this page helpful?

Edit on GitHub

Last updated on

PreviousQuickstart (5 minutes)NextFAQ

On this page

  • Platform vocabulary
  • Core entities
  • Request path (Phase 1)
  • Required headers
  • Permission model
  • Error envelope
  • Multi-tenancy principles
  • Future concepts (not yet available)
  • Mental model summary
  • Related guides
0%