How blueraai/universal-intelligence works
Universal Intelligence is a cross-platform protocol and component library for composing models, tools, and agents. A user submits a task to an agent; the agent plans work with its model, dispatches selected tool or team-member methods, and uses the results to produce a response. The Python and TypeScript trees provide parallel implementations. Local Hugging Face inference, remote model providers, API/MCP tools, and playgrounds are distinct capabilities. The excerpts show agent dispatch and local inference mechanics; several provider and tool integrations are represented by paths and README capabilities, so their internal links are omitted where wiring is not shown.
Main entry points: agent.py Simple agent · example.py Python playground · agent.ts Simple agent · model.py Local model
Components 23
Protocol contracts
- Agent contract
universal_intelligence/core/universal_agent.py - Model contract
universal_intelligence/core/universal_model.py - Tool contract
universal_intelligence/core/universal_tool.py - Shared types
universal_intelligence/core/utils/types.py - Agent contract
universal_intelligence/www/core/UniversalAgent.ts - Model contract
universal_intelligence/www/core/UniversalModel.ts - Tool contract
universal_intelligence/www/core/UniversalTool.ts - Shared types
universal_intelligence/www/core/types.ts
Python components
- Simple agent
universal_intelligence/community/agents/simple_agent/agent.py - HF inference
universal_intelligence/community/models/__utils__/mixins/hf_text_to_text/interface.py - Community tools
universal_intelligence/community/tools - Python playground
playground/example.py
TypeScript components
- Simple agent
universal_intelligence/www/community/agents/simple_agent/agent.ts - HF inference
universal_intelligence/www/community/models/__utils__/mixins/hf_text_to_text/interface.ts - Remote registry
universal_intelligence/www/community/models/remote/index.ts - API caller
universal_intelligence/www/community/tools/api_caller/tool.ts
Model and tool integrations
- Local model
universal_intelligence/community/models/local/qwen2_5_7b_instruct/model.py - Remote models
universal_intelligence/community/models/remote - API caller
universal_intelligence/community/tools/api_caller/tool.py - MCP client
universal_intelligence/community/tools/mcp_client/tool.py - Simple printer
universal_intelligence/community/tools/simple_printer/tool.py
Other components
- Application user
- Model provider
Connections 18
- Application user → Simple agent: submits task
- Simple agent → Model contract: uses model
universal_intelligence/community/agents/simple_agent/agent.py - Simple agent → Tool contract: dispatches methods
universal_intelligence/community/agents/simple_agent/agent.py - Simple agent → Local model: defaults to
universal_intelligence/community/agents/simple_agent/agent.py - Local model → HF inference: uses inference
- Simple agent → API caller: can invoke
- Simple agent → Simple printer: can invoke
- Simple agent → MCP client: can invoke
- Remote models → Model provider: calls provider
- Application user → Simple agent: submits task
- Simple agent → Model contract: uses model
universal_intelligence/www/community/agents/simple_agent/agent.ts - Simple agent → Tool contract: dispatches methods
universal_intelligence/www/community/agents/simple_agent/agent.ts - Simple agent → HF inference: may use
- Remote registry → Model provider: calls provider
- Python playground → Simple agent: runs example
playground/example.py - Python playground → Local model: runs example
playground/example.py - Python playground → API caller: runs example
playground/example.py - Python playground → Simple printer: runs example
playground/example.py