
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
subconscious-python
Advanced tools
A Python SDK for the Subconscious AI agent framework, providing structured reasoning and tool integration capabilities.
Install the package using pip:
pip install subconscious-python
Note: The package name is
subconscious-pythonbut you import it assubconscious:import subconscious # Import name remains clean and simple
For development installation:
pip install -e .
from subconscious import Client
# Initialize the client
client = Client(
base_url="https://api.subconscious.dev/v1", # can be omitted
api_key="your-api-key" # get it from https://subconscious.dev
)
# Define tools
tools = [
{
"type": "function",
"name": "calculator",
"url": "https://URL_TO_CALCULATOR_TOOL/ENDPOINT", # the server url of your own tool
"method": "POST",
"timeout": 5, # seconds
"parameters": {
"type": "object",
"properties": {
"operation": {"type": "string"},
"a": {"type": "number"},
"b": {"type": "number"}
},
"required": ["operation", "a", "b"]
}
}
]
# Build toolkit
client.build_toolkit(tools, agent_name="math_agent")
# Run agent
messages = [{"role": "user", "content": "What is 2 + 3?"}]
response = client.agent.run(messages, agent_name="math_agent")
print(response)
The TIM language model will call the calculator tool as many times as necessary, handle excepts, compute the answer, and return the result. The agent is completed with one language model API call!
We also provide fine-grained control over the reasoning structure, tool use, and memory management. Check out the deep research agent example for more advanced usage.
Main client class for interacting with the Subconscious API.
client = Client(base_url="https://api.subconscious.dev", api_key="your-api-key")
Core agent functionality for parsing and running structured reasoning tasks.
response = client.agent.parse(messages, model="tim-large", tools=tools)
response = client.agent.run(messages, agent_name="default", thread_name="default")
Create custom tools and task structures:
# Build a toolkit
client.build_toolkit(tools, agent_name="my_agent")
# Create custom tasks
task = client.create_task(
task_name="analysis",
agent_name="my_agent",
thought="Analyze the data",
tools=("tool1", "tool2")
)
# Create custom threads
thread = client.create_thread(
reasoning_model=MyReasoningModel,
answer_model=str,
agent_name="my_agent",
thread_name="custom"
)
MIT License - see LICENSE file for details.
For support and questions:
FAQs
Python SDK for Subconscious AI agent framework
We found that subconscious-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.