Skip to content

Commit 9e2822d

Browse files
authored
Merge pull request #948 from jupyter-naas/fix/local-dev-setup
fix(local-dev): make local stack work out of the box
2 parents b131243 + b6350ec commit 9e2822d

61 files changed

Lines changed: 821 additions & 3355 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.deploy/docker/element-config.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

.deploy/docker/service-portal/index.html.template

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,6 @@ const NODES_DEF = [
334334
status: 'local',
335335
links: [{ label: 'Dagster UI', port: 3001, path: '/' }],
336336
},
337-
{
338-
id: 'matrix', label: 'Matrix\n+ Element', group: 'ui',
339-
type: 'Messaging UI',
340-
desc: 'Federated Matrix server (Synapse) and Element web client for distributed AI output delivery.',
341-
status: 'running',
342-
links: [
343-
{ label: 'Element Web', port: 8081, path: '/' },
344-
{ label: 'Synapse API', port: 8008, path: '/' },
345-
],
346-
},
347337

348338
// ── CUSTOM MODULES ────────────────────────────────────────────────────────
349339
// These nodes are populated from the abi00-modules package loaded by the
@@ -371,8 +361,6 @@ const EDGES_DEF = [
371361
{ from: 'abi-api', to: 'dagster' },
372362
{ from: 'dagster', to: 'minio' },
373363
{ from: 'dagster', to: 'postgres' },
374-
// matrix
375-
{ from: 'matrix', to: 'abi-api' },
376364
// nexus ↔ data
377365
{ from: 'nexus', to: 'postgres' },
378366
{ from: 'nexus', to: 'redis' },

.deploy/docker/synapse/bootstrap.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

.env.example

Lines changed: 0 additions & 57 deletions
This file was deleted.

AGENTS.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,27 @@ def unsupported_method(self, arg: str) -> None:
165165
**Problem:** Frontend won't start (`next: command not found`)
166166
**Solution:** Run `pnpm install` in `libs/naas-abi/naas_abi/apps/nexus/apps/web`
167167

168-
### Stack Management
168+
### Local Access
169+
170+
After `abi stack start`, the web UI is at `http://localhost:3042`.
171+
172+
Default admin credentials (set in `config.local.yaml` under `nexus_config.users`):
173+
174+
| Email | Password |
175+
|---|---|
176+
| `admin@example.com` | `Admin1234!` |
177+
178+
Password login is enabled via `auth_password_enabled: true` in `config.local.yaml`. Set it to `false` to switch back to magic link.
179+
180+
If you see "Incorrect email or password", the Postgres volume may have been initialized with a different password. Reset it:
181+
182+
```bash
183+
PG_PASS=$(grep POSTGRES_PASSWORD .env | cut -d= -f2)
184+
docker exec abi-postgres-1 psql -U abi -c "ALTER USER abi PASSWORD '$PG_PASS';"
185+
docker compose restart abi
186+
```
187+
188+
## Stack Management
169189

170190
```bash
171191
# Start full stack (requires RabbitMQ, Redis, Qdrant, MinIO)

README.md

Lines changed: 102 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -22,89 +22,144 @@ ABI (Agentic Brain Infrastructure) is the open-source AI Operating System that g
2222

2323
</div>
2424

25+
## Why ABI?
26+
27+
Most AI platforms lock you in: proprietary data models, opaque pipelines, no exit. When the vendor changes pricing or discontinues a model, you have no contingency.
28+
29+
ABI is built for continuity and ownership. Every layer is swappable: LLM providers, infrastructure services, data adapters. Agents reason over context sources you control (knowledge graph, vector store, file system), so your data and logic stay yours regardless of what any upstream vendor does.
30+
31+
It also covers the full stack from ingestion to UI, so you are not stitching together five different tools. The knowledge graph is built on [ISO/IEC 21838-2 Basic Formal Ontology (BFO)](https://www.iso.org/standard/74572.html), the open top-level ontology standard used in biotech, defense, and enterprise. BFO-grounded data makes compliance with [ISO/IEC 42001:2023 AI Management Systems](https://www.iso.org/standard/42001) and the [EU AI Act (Regulation 2024/1689)](https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L_202401689) significantly easier, since traceability and auditability are built into the data model from the start.
32+
2533
## Quick Start
2634

2735
### Prerequisites
2836

2937
- Python 3.12+, Git, [uv](https://astral.sh/uv) (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
3038
- [Docker Desktop](https://www.docker.com/products/docker-desktop) (8GB+ RAM for full stack)
31-
- LLMs API key: OpenAI and OpenRouter
39+
- LLM API keys: any OpenAI-compatible provider (OpenAI, OpenRouter, or equivalent)
3240

33-
You also need to have the `docker` command available in your terminal.
34-
35-
### Local Development
41+
### Get started
3642

3743
```bash
3844
uv tool install naas-abi-cli --force --upgrade
3945

40-
abi new project demo #You can change the project name to your own
41-
cd demo
46+
abi new project my_ai # replace "my_ai" with your project name
47+
cd my_ai
4248
abi start
4349
```
4450

45-
**Platform launch:**
51+
### Web UI
52+
53+
The main interface. Chat with Abi, switch agents, manage your workspace, and access your knowledge graph. Open [http://localhost:3042](http://localhost:3042) and log in with `admin@example.com` / `Admin1234!`.
4654

47-
- Services Portal: https://localhost:8080
48-
- Backend: https://api.localhost (Important: you must access it first and accept the self-signed TLS certificate for the frontend to work)
49-
- Frontend: https://nexus.localhost
55+
<div align="center">
56+
<img src="docs/site/static/abi/Screenshot_Local_WebUI.png" alt="ABI web UI" width="800">
57+
</div>
5058

51-
### CLI Commands
59+
### API
60+
61+
Every agent is exposed as a REST endpoint. Useful for integrating ABI into your own tools, triggering agents from scripts, or building on top of the platform. Explore the full reference at [http://localhost:9879/docs](http://localhost:9879/docs).
62+
63+
<div align="center">
64+
<img src="docs/site/static/abi/Screenshot_Local_API.png" alt="ABI API docs" width="800">
65+
</div>
66+
67+
### CLI
68+
69+
Run `abi chat` to talk to Abi directly from your terminal. No browser needed.
70+
71+
<div align="center">
72+
<img src="docs/site/static/abi/Screenshot_Local_CLI.png" alt="ABI CLI" width="800">
73+
</div>
5274

5375
```bash
54-
abi start # Start all services
55-
abi stop # Stop all services
56-
abi chat # Interactive agent chat
57-
abi config validate # Validate the configuration
76+
abi start # Start the full stack and open the browser
77+
abi stop # Stop all running services
78+
abi chat # Chat with Abi in the terminal
79+
abi logs # Tail logs from a service (e.g. abi logs abi)
80+
abi stack status # Check health of all running containers
81+
abi config validate # Check your config.yaml for errors
82+
abi new module # Scaffold a new module
83+
abi new agent # Scaffold a new agent
84+
abi new workflow # Scaffold a new workflow
5885
```
5986

6087
## How It Works
6188

62-
**1. Your data becomes structured knowledge**
89+
Everything in ABI is organized around **modules**. A module models a domain, connects to its data sources, and exposes intelligent capabilities on top. You enable one with a single line in `config.yaml`.
6390

64-
Connect any data source: CRMs, code repositories, databases, productivity tools, financial systems. ABI ingests everything, maps relationships between entities, and builds a living knowledge graph of your organization. Not a data warehouse. A model of your reality.
91+
A module bundles:
6592

66-
**2. Your team gets AI that knows their job**
93+
- **Agents**: LLM-powered agents that reason over the knowledge graph and dispatch to the right domain capability
94+
- **Applications**: web UI, REST API, and CLI surfaces that expose module capabilities to end users and operators
95+
- **Integrations**: connectors to external APIs (GitHub, Salesforce, LinkedIn, Notion, ...) that pull data into the module
96+
- **Ontologies**: OWL/Turtle files that define the domain as typed entities and relationships in a knowledge graph
97+
- **Orchestrations**: Dagster-based schedules, jobs, and event sensors that automate module execution
98+
- **Pipelines**: operations that read and write RDF triples to the knowledge graph (add, merge, insert)
99+
- **Workflows**: structured callable tools exposed to agents and users that query or act on the knowledge graph
67100

68-
Build agents for any role and workflow, each grounded in your organization's ontology. They understand the context of the work, not just the words in the question. The more you build, the deeper the institutional intelligence.
101+
Each infrastructure concern is abstracted as a port with a swappable adapter. Change the adapter in `config.yaml`, no module code changes needed. The community edition ships every service as a Docker container. Enterprise deployments swap each adapter for a managed cloud service or run the whole stack on Kubernetes.
69102

70-
**3. Every question finds the right intelligence**
103+
- **Triple store** (knowledge graph): Community: Apache Fuseki / Enterprise: Amazon Neptune, Stardog, Ontotext GraphDB
104+
- **Vector store** (semantic search): Community: Qdrant / Enterprise: Pinecone, Weaviate, pgvector, Azure AI Search
105+
- **Relational store** (agent memory): Community: PostgreSQL / Enterprise: Amazon RDS, Azure Database, Cloud SQL
106+
- **Object storage** (files and artifacts): Community: MinIO / Enterprise: Amazon S3, Azure Blob Storage, Google Cloud Storage
107+
- **Message bus** (async task routing): Community: RabbitMQ / Enterprise: Amazon MQ, Azure Service Bus, Google Pub/Sub
108+
- **Cache** (sessions and hot data): Community: Redis / Enterprise: Amazon ElastiCache, Azure Cache for Redis, Memorystore
109+
- **Orchestration** (schedules and sensors): Community: Dagster / Enterprise: Dagster Cloud, Airflow on MWAA, Cloud Composer
71110

72-
A supervisor agent reads the intent behind each request and routes it to the right AI model, domain expert agent, or directly into your knowledge graph. Swap providers without rebuilding. The infrastructure adapts as AI evolves.
111+
The **Context Engine** wires all these services at startup and routes every request to the right agent. **Abi** acts as the supervisor: it reads the intent behind each request and dispatches to the right domain agent or answers directly from the knowledge graph, vector store, or file system.
73112

74-
For the full architecture, including module structure, five-layer stack, services, and data flow, see [The ABI Stack](https://docs.naas.ai/architecture/the-stack).
113+
Start with the marketplace modules to get running immediately, then use `abi new module` to model your own domain. Full architecture reference: [The ABI Stack](https://docs.naas.ai/architecture/the-stack).
75114

76115
## Repository Layout
77116

78-
| Package | What it does |
79-
| ---------------------- | ---------------------------------------------------------------- |
80-
| `naas-abi-core` | Infrastructure adapters: storage, vector DB, message bus, SPARQL |
81-
| `naas-abi` | Core agents, ontologies, and the Nexus app (API + web UI) |
82-
| `naas-abi-cli` | The `abi` CLI |
83-
| `naas-abi-marketplace` | Optional domain agents and third-party integrations |
117+
**Your project** (created with `abi new project my_ai`):
84118

85-
## Production Deployment
119+
```
120+
my_ai/
121+
├── src/
122+
│ └── my_ai/ # Your module (agents, integrations, ontologies, ...)
123+
├── config.yaml # Base module and service configuration
124+
├── config.local.yaml # Local overrides (ports, credentials, enabled modules)
125+
├── config.remote.yaml # Remote/production overrides
126+
├── docker-compose.yml # Local stack definition (generated)
127+
├── pyproject.toml # Python project, naas-abi-* installed as dependencies
128+
└── .env # Secrets and environment variables
129+
```
86130

87-
### Self-Hosted Docker
131+
**This repo** (for contributors):
88132

89-
```bash
90-
docker compose up -d
133+
```
134+
abi/
135+
├── libs/
136+
│ ├── naas-abi-core/ # Infrastructure adapters (storage, vector DB, message bus, SPARQL)
137+
│ ├── naas-abi/ # Core agents, ontologies, and the Nexus app (API + web UI)
138+
│ ├── naas-abi-cli/ # The abi CLI
139+
│ └── naas-abi-marketplace/ # Domain modules and third-party integrations
140+
├── docs/site/ # Docusaurus documentation site
141+
├── docker/ # Caddy, Dagster, Postgres, and service configs
142+
├── scripts/ # Utility scripts (sync, export, datastore, docs generation)
143+
├── config.local.yaml # Module and service configuration (local)
144+
├── config.yaml # Module and service configuration (base)
145+
└── docker-compose.yml # Local stack definition
91146
```
92147

93-
Full stack with PostgreSQL, Fuseki, Qdrant, MinIO
148+
## Production Deployment
94149

95-
### Managed Hosting
150+
### Self-Hosted
96151

97-
Need a hosted, managed deployment? [Get started on naas.ai](https://naas.ai) or reach out to the team directly.
152+
Copy your `.env` and config files to the target server, then run:
98153

99-
## Why ABI?
154+
```bash
155+
docker compose -f docker-compose.yml up -d
156+
```
100157

101-
Most AI tools are black boxes. ABI is built on open standards so every decision is traceable, every model is replaceable, and you own your data.
158+
All services (PostgreSQL, Fuseki, Qdrant, MinIO, RabbitMQ, Redis, Dagster) start as containers. For production workloads, swap the Docker adapters for managed cloud services as described in [How It Works](#how-it-works).
102159

103-
**Built on international standards:**
160+
### Managed Hosting
104161

105-
- [ISO/IEC 42001:2023](https://www.iso.org/standard/42001) - AI Management Systems
106-
- [ISO/IEC 21838-2:2021](https://www.iso.org/standard/74572.html) - Basic Formal Ontology (BFO)
107-
- EU AI Act compliance-ready
162+
Need a hosted, managed deployment? [Get started on naas.ai](https://naas.ai) or reach out to the team directly.
108163

109164
## Research & Development
110165

@@ -116,14 +171,16 @@ Collaborative effort between:
116171
- **[NCOR](https://ncor.buffalo.edu/)** - National Center for Ontological Research
117172
- **[Forvis Mazars](https://www.forvismazars.com/)** - Global Audit & Consulting
118173

119-
**If ABI is useful to you, star the repo to help others find it.**
120-
121174
## Contributing
122175

123-
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
176+
We welcome contributions. Open an issue or pull request to get started.
124177

125178
## License
126179

127-
MIT License - see [LICENSE](https://opensource.org/licenses/MIT)
180+
MIT License - see [LICENSE](LICENSE)
128181

129182
For enterprise support or managed hosting, visit [naas.ai](https://naas.ai).
183+
184+
---
185+
186+
⭐ If ABI is useful to you, star the repo to help others find it.

0 commit comments

Comments
 (0)