Skip to main content

Production-ready AI agent framework for FIPS/OpenShift environments

Project description

fipsagents

Production-ready AI agent framework for FIPS/Red Hat AI environments. Provides BaseAgent — a pure Python, async-first base class that handles LLM communication, tool dispatch, MCP connections, prompt loading, skill management, configuration, and lifecycle so your agent subclass stays small.

Install

pip install fipsagents[server]

With optional MemoryHub support:

pip install fipsagents[server,memory]

With Prometheus metrics endpoint:

pip install fipsagents[server,metrics]

With OpenTelemetry trace export:

pip install fipsagents[server,otel]

Or vendor the source directly into your project for full control:

fips-agents vendor

See VENDORED marker in src/fipsagents/ for provenance tracking.

Quick start

from fipsagents.baseagent import BaseAgent, StepResult

class MyAgent(BaseAgent):
    async def step(self) -> StepResult:
        response = await self.call_model()
        response = await self.run_tool_calls(response)
        return StepResult.done(response.content)

if __name__ == "__main__":
    from fipsagents.server import OpenAIChatServer
    server = OpenAIChatServer(agent_class=MyAgent, config_path="agent.yaml")
    server.run()

What's included

  • LLM client via the openai async SDK — connects to any OpenAI-compatible endpoint (vLLM, LlamaStack, llm-d)
  • Two-plane tool system@tool decorator with agent_only, llm_only, or both visibility
  • MCP client via FastMCP v3 — connect to remote servers (tools, prompts, and resources)
  • Prompt loading — Markdown with YAML frontmatter
  • Skills — agentskills.io progressive disclosure
  • Configuration — YAML with ${VAR:-default} env var substitution
  • Pluggable memory — memoryhub, markdown, sqlite, pgvector, llamastack, custom, or null. Budget presets (small/medium/large) auto-tune for model context size. Deferred loading, user-turn injection for small models, and per-turn recall patterns
  • Protective patterns — max iterations, exponential backoff, rate limiting
  • HTTP server — OpenAI-compatible /v1/chat/completions endpoint with streaming, extended sampling parameters (top_p, top_k, repetition_penalty, reasoning_effort), and multimodal content blocks (text + image_url). Image bytes can be referenced inline as data: URIs, by URL, or by the internal file_id:<id> scheme — uploads via POST /v1/files are resolved server-side from the configured BytesStore before the model call
  • File uploadsPOST /v1/files accepts multipart uploads, persists each file via the configured FileStore, and exposes them either as extracted-text context (pass file_ids: [...] on a chat completion) or as image bytes (reference file_id:<id> from an image_url content block). Opt-in via the [files] extra
  • run_tool_calls() — one-line tool dispatch loop for non-streaming agents
  • Agent identity — name, description, version exposed via /v1/agent-info

Key methods

Method Purpose
call_model() LLM completion with auto-included tool schemas
run_tool_calls(response) Execute tool calls and loop until the model stops
call_model_json(schema) Structured output with Pydantic validation
call_model_validated(fn) Call, validate, retry with backoff
use_tool(name, **kw) Agent-code tool call (plane 1)
connect_mcp(target) Connect to an MCP server
get_mcp_prompt(name) Render an MCP-provided prompt
read_resource(uri) Read an MCP-provided resource

Used by

This package is the shared framework for templates scaffolded by the fips-agents CLI:

  • agent-loop — single-agent loop (step() in a loop)
  • workflow — directed graph of nodes with typed state

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fipsagents-0.31.2.tar.gz (456.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fipsagents-0.31.2-py3-none-any.whl (291.5 kB view details)

Uploaded Python 3

File details

Details for the file fipsagents-0.31.2.tar.gz.

File metadata

  • Download URL: fipsagents-0.31.2.tar.gz
  • Upload date:
  • Size: 456.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fipsagents-0.31.2.tar.gz
Algorithm Hash digest
SHA256 bb8b5ad6035f92b6e5ecd44e0f20e63c4c351d84be9b5d1d51ca246bb6c05932
MD5 444c3c3032ab7f497417e0c339adbde2
BLAKE2b-256 713cc00d84c4e55dd972eab6e3dfb9a631b64ead9b8be98531a87948d03160d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for fipsagents-0.31.2.tar.gz:

Publisher: publish.yml on fips-agents/agent-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fipsagents-0.31.2-py3-none-any.whl.

File metadata

  • Download URL: fipsagents-0.31.2-py3-none-any.whl
  • Upload date:
  • Size: 291.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fipsagents-0.31.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e2a9cb6c9615f98e39efed7ac8d1e16faf9b7347a2672e72792ccdf31d051c9
MD5 2206406d00bab2e0081b67482babb385
BLAKE2b-256 edb53071a72c42ec90ef4a612e407302b7d5669e37d54f6eccc5bc4424aca524

See more details on using hashes here.

Provenance

The following attestation bundles were made for fipsagents-0.31.2-py3-none-any.whl:

Publisher: publish.yml on fips-agents/agent-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page