Internal Agentica libraries
Project description
Agentica Internal Libraries
Agentica is a type-safe AI framework that lets LLM agents integrate with your code—functions, classes, live objects, even entire SDKs. Instead of building MCP wrappers or brittle schemas, you pass references directly; the framework enforces your types at runtime, constrains return types, and manages agent lifecycle.
Overview
This package contains internal shared libraries for the Agentica framework. This package provides the foundational components used by both the client SDKs and session manager, including communication protocols, Python execution environments, and telemetry infrastructure.
The following may be found here:
- Protocol definitions for HTTP and WebSocket communication
- Python REPL with custom evaluation semantics
- Remote procedure call system for distributed Python object access
- Telemetry with OpenTelemetry integration
- Core utilities shared across all components
See also:
Package Structure
Communication Protocols
session_manager_messages/
HTTP-based protocol for initial client-server interactions and telemetry events.
See there for:
- Agent creation and configuration messages
- OpenTelemetry span definitions following GenAI semantic conventions
- Distributed tracing with trace context propagation
- Structured logging payloads for code execution and results
multiplex_protocol/
WebSocket-based bidirectional messaging protocol for agent invocations.
See there for:
- Invoke, cancel, and stream messages
- Error propagation with typed exception hierarchies
- Timestamped event tracking, parent-child tracking
invocation_protocol/
Higher-level abstraction for agent invocation messages.
See there for:
- Type-safe message definitions using
msgspec - Client/server message type unions
- Invocation lifecycle events (ENTER, EXIT, ERROR)
- Warp payload handling for distributed Python objects
Python Execution
repl/
Self-contained Python REPL with enhanced capabilities.
See there for:
- Top-level
awaitsupport with event loop integration - Automatic printing of last expression in multi-line blocks
- Custom
importsemantics and module interception - Temporary stdio redirection during evaluation
- Enhanced stack traces and error formatting
- Variable tracking and diff generation
- Evaluation history and session management
Main classes:
BaseRepl- Core REPL implementationReplEvaluationInfo- Metadata about code evaluationReplVars- Variable namespace managementReplCode- Code compilation with custom options
cpython/
CPython introspection and manipulation utilities.
See there for:
frame.py- Stack frame inspectionfunction.py- Function introspection and modificationcode.py- Code object manipulationmodule.py- Module managementinspect.py- Enhanced inspection utilitiesiters.py- Iterator protocol helpersclasses/- Class introspection
Remote Procedure Calls
warpc/
"Warp C" - Distributed Python object system enabling seamless remote execution.
See there for:
- Transparent remote object access across client/server boundary
- Message-based request/response protocol
- Resource lifecycle management
- Hook system for intercepting operations
- Support for async operations, iterators, and context managers
- Type-safe message definitions
Core components:
msg/- 30+ message types for all Python operationsrequest/- Request handling infrastructureresource/- Remote object lifecycle managementworlds/- Execution context isolationinterceptor.py- Operation interception frameworkhooks.py- Customizable behavior hooks
warpc_transcode/
Transcoding layer between Python objects and universal message format.
See there for:
- Bidirectional Python ↔ Universal message conversion
- Type-safe serialization using
msgspec - System ID mapping across runtimes
- Handles complex types (classes, functions, iterators, exceptions)
Core Utilities
core/
Shared utilities used throughout the framework.
See there for:
log/- Structured logging frameworkansi/- Terminal color and formattingcollections/- Custom collections (bidict,chaindict)json.py- Enhanced JSON handlingresult.py- Result/Error type systemfutures.py- Future utilitiesqueues.py- Queue abstractionstype.py- Type utilitiesfmt.py- Formatting helpershashing.py- Hashing utilitiessentinels.py- Sentinel values
javascript/
JavaScript interoperability utilities.
See there for:
equivalents.py- Python/JavaScript type mappingsids.py- JavaScript-compatible ID generation
Observability
telemetry/
OpenTelemetry integration for distributed tracing.
See there for:
- OTLP gRPC exporter configuration
- Service resource management
- Batch span processing, environment-based configuration
Environment variables
OTEL_EXPORTER_OTLP_ENDPOINT- Collector endpointOTEL_SERVICE_NAME- Service identificationOTEL_GENAI_CAPTURE_CONTENT- Enable content capture
Error Handling
internal_errors/
Hierarchical error types for internal operations.
See there for:
InvocationError- Invocation lifecycle errorsGenerationError- Generation and execution errorsConnectionError- Network and transport errorsBugError- Internal framework bugs
All errors inherit from AgenticaError base class and are serializable for transmission between client and server.
Testing
testing/
Test utilities and example code for internal development.
See there for:
- Example Python code for testing edge cases
- REPL test scenarios
- Warp transcoding test cases
- Demo scripts for various features
Usage
This package is intended for internal use only within the Agentica framework. It is consumed by:
- The Agentica Python SDK
- The Agentica Server
- and it is exercised by The Agentica TypeScript SDK
External users should use the public SDK packages, not agentica_internal directly.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentica_internal-0.4.1.tar.gz.
File metadata
- Download URL: agentica_internal-0.4.1.tar.gz
- Upload date:
- Size: 10.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c8a6b472d3dd6480985f69b911d219f487013b94b3fdb9f4bffbb0f8a5b8605
|
|
| MD5 |
01a9e8ea03cfec29a4401e5d62436646
|
|
| BLAKE2b-256 |
6d797292cd9fa626308032f1795813c233dfe7f6c31af115a76ce25e879c6128
|
File details
Details for the file agentica_internal-0.4.1-py3-none-any.whl.
File metadata
- Download URL: agentica_internal-0.4.1-py3-none-any.whl
- Upload date:
- Size: 488.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60c748a1d9f5e00b0ccb017dff808022d88da5ffcf18a25e4c1b564a9d3c13b1
|
|
| MD5 |
67db532c3458adf8ca57bc49a01b5800
|
|
| BLAKE2b-256 |
56445045eb834ce888673a21c7aaff1de7017f916e5ce61488750bc940363202
|