Building Enterprise AI Agents with the Fikra Claw Framework

Fikra Claw is Lacesse's proprietary, lightweight Python SDK for building autonomous agents. It abstracts away the complex ReAct loops and JSON parsing, allowing you to deploy secure, tool-using agents in under 20 lines of code.

1. Installation and Auth

The Fikra Claw package is available via pip. It is designed to be fully compatible with both the Lacesse Cloud API and local EdgeCore deployments.

pip install fikra-claw python-dotenv

Ensure your environment variables are set. Grab your key from the Lacesse Developer Portal.

2. The @tool Decorator

In raw API integrations, you have to write complex JSON schemas (as seen in Agents Using APIs). Fikra Claw uses Python decorators to automatically extract your function's docstring and type hints to create the JSON schema for the AI.

from fikra_claw import tool

@tool
def fetch_customer_balance(account_id: str) -> str:
    """
    Fetches the current account balance for a given customer.
    Args:
        account_id: The unique 8-digit alphanumeric account identifier.
    """
    # ... your internal database logic here ...
    return f"Balance for {account_id} is Ksh 45,000"

Because Fikra Claw handles the parsing, the LLM will never send the wrong data type to your function.

3. Initializing the Agent

With your tools defined, you instantiate the agent. We pass the Fikra model we want to use, the system prompt, and the array of tools.

from fikra_claw import FikraAgent

agent = FikraAgent(
    model="fikra-ternary-v1",
    system_prompt="You are a helpful banking assistant. Only answer queries related to account balances. Use tools when necessary.",
    tools=[fetch_customer_balance],
    max_loops=5  # Prevents infinite tool-calling loops
)

# Run the agent synchronously
response = agent.run("What is the balance for account XZY98765?")
print(response)
# Output: "I have checked the system. The balance for account XZY98765 is Ksh 45,000."

4. Deploying to EdgeCore

For organizations requiring strict data residency (such as healthcare and finance), Fikra Claw is natively designed to switch from the Cloud API to a local EdgeCore hardware instance.

Simply change the `base_url` in your agent initialization to point to your local NPU server:

agent = FikraAgent(
    model="fikra-local-edge",
    base_url="http://192.168.1.100:8080/v1", # Points to local EdgeCore box
    tools=[...]
)

This allows African enterprises to build and test using the cloud API, and seamlessly transition to secure, offline edge computing for production.

5. Frequently Asked Questions

What makes Fikra Claw different from global AI frameworks?

Unlike bloated frameworks such as LangChain, Fikra Claw is lightweight, highly opinionated, and natively optimized for African infrastructure. It is designed to run Fikra Ternary Weight models efficiently on Lacesse EdgeCore hardware in environments with limited internet bandwidth.

Is the Fikra Claw framework open-source?

The core orchestration SDK is open-source and available on the Lacesse GitHub repository. However, the proprietary Fikra AI reasoning models that power the framework require an API key or a commercial on-premise license to execute.

How do I generate an API key to start using Fikra Claw?

Developers can generate a free tier API key by creating an account at lacesse.co.ke/api/home. This grants access to the Fikra models required to power the Fikra Claw framework loops.