Skip to main content

spatialagents

The in-app AI conversation runtime BioCognia's products share (Plexora, SCIMAP Pro): the streamed model call through the BioCognia AI gateway, a tool loop with deferred tool schemas, approvals for source-file writes and deletes, sub-agents, deterministic compaction, a tool-result cache, offloaded results, the conversation store, the local trace and a terminal loop.

A product binds it with three things and never the other way round:

  • a spatialagents.backend.ToolBackend: what its tools are and how one runs (catalog, definition, permission(tool, arguments), invoke, ...);
  • a spatialagents.runner.ChatProfile: its prompt content, task names and wording;
  • its places on disk and its version, given to each store.
from biocognia.gateway import TokenSource
from spatialagents.conversations import ChatService, ConversationStore
from spatialagents.gateway import GatewayClient
from spatialagents.policy import Policy

service = ChatService(ConversationStore(root / "conversations"),
                      gateway_factory=lambda: GatewayClient(TokenSource(LICENSING)),
                      backend_factory=MyBackend, profile=MY_PROFILE)
started = service.start(Policy())

Dependencies: the standard library, biocognia, pydantic, pyyaml. No mcp, anndata, Flask or numpy, and nothing from either product; import spatialagents imports nothing beyond the standard library.

Tests need no product, no network and no model: spatialagents.testing has FakeGateway (the gateway's wire and a prompt-cache emulator), FakeToolBackend and ScriptedBrain, and registers inert pytest fixtures.

UV_PROJECT_ENVIRONMENT=$HOME/.venvs/spatialagents uv sync --all-groups
BIOCOGNIA_OFFLINE=1 $HOME/.venvs/spatialagents/bin/python -m pytest -q -p no:cacheprovider

Metadata

Release files for spatialagents 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spatialagents 0.1.0
File Size Uploaded
spatialagents-0.1.0.tar.gz 162.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spatialagents 0.1.0
File Interpreter ABI Platform
spatialagents-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 278.7 kB

Release files / spatialagents-0.1.0.tar.gz

Download URL spatialagents-0.1.0.tar.gz
Size 162.6 kB
Tags Source
SHA-256 checksum
How to use checksums
277c5944d5f5490d6362161f5e551c8ffcd2031a8df0701591a3468de3377fc4
BLAKE2b-256 checksum
How to use checksums
d773a2a21169af8309eb3b59976c1d920d41db44c843d407823e3988346bd668
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release files / spatialagents-0.1.0-py3-none-any.whl

Download URL spatialagents-0.1.0-py3-none-any.whl
Size 116.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a528ffc4171239561fa3e8aa5f8ce2bcae686373df1ee1b39df408b6c437015
BLAKE2b-256 checksum
How to use checksums
af4afc04ce8a6b59c0d110e6ae3adc60efdf01c88489f5979f45fc68759a7b73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page